Long story short: on Chrome and Safari only, values from a login form are sometimes pasted into the user's URL, even though the actual login is POSTed via AJAX.
http://my-site.example/?name=user&pw=xxx&challenge=b1be8ad7aac242...
It's been reported repeatedly and I've seen it happen myself, but have been unable to reproduce it myself, much less figure out what on earth is going on. Here's what the login form boils down to:
<form name="login">
<input type="Text" name="name">
<input type="password" name="pw">
<input type="hidden" name="challenge">
<input type="button" onclick='JavaScript:xmlhttpPost("/php/login.php")'>
</form>
The actual POSTed request does not even contain the challenge parameter:
function xmlhttpPost(strURL) {
if (window.XMLHttpRequest) {
self.xmlHttpReq = new XMLHttpRequest();
} else if (window.ActiveXObject) {
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
self.xmlHttpReq.open('POST', strURL, true);
...
query = 'name=' + encodeURIComponent(name) + '&pw=' + encodeURIComponent(hash) + '&lpw=' + encodeURIComponent(legacy_hash);
self.xmlHttpReq.send(query);
}
And on successful login, the user is redirected back to the same page (= forced to reload) if and only if they have a different language setting from the default:
location.href = "http://" + location.host + location.pathname;
Any ideas?