Another (unsuccessful) try:
This time, I checked if there is a JavaScript messing with login process, so fired up Firebug and inspected the login page. I saw this JavaScript.
Spoiler:
PHP Code:
function setActiveStyleSheet(title) {
var i, a, main;
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
a.disabled = true;
if(a.getAttribute("title") == title) a.disabled = false;
}
}
}
function getActiveStyleSheet() {
var i, a;
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
}
return null;
}
function getPreferredStyleSheet() {
var i, a;
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1
&& a.getAttribute("rel").indexOf("alt") == -1
&& a.getAttribute("title")
) return a.getAttribute("title");
}
return null;
}
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
window.onload = function(e) {
var cookie = readCookie("style");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);
}
window.onunload = function(e) {
var title = getActiveStyleSheet();
createCookie("style", title, 365);
}
var cookie = readCookie("style");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);
Now I am out of my comfort zone as I don't know this language, but I can see couple of functions with cookie in their names: readCookie(name) and createCookie(name,value,days)
Does get_browser() remove the JavaScript?
I tried removing remove_javascript = True from recipe and changing it to False, but didn't login.
I tried to follow
this post,
Spoiler:
Some web developers like to submit their log in form by using a JavaScript function that, before submitting the form, manipulates some input values (perhaps to prevent the very thing we are discussing here). If you run into that, examine the function and mimic it's behavior. If the script is hard to find, use Firebug's find feature to search for it. Here is an example of setting the value of a hidden input:
PHP Code:
br.select_form(nr = 0)
# find by index
ctl_1 = br.find_control(type = 'hidden', nr = 3)
# or by name
ctl_2 = br.find_control(type = 'hidden', name = 'meal')
ctl_1.readonly = False
ctl_2.readonly = False
ctl_1.value = 'spam'
ctl_2.value = 'eggs'
but completely lost.
Anybody? Please!