mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 447788 - Login not filled if existing form username differs in case. r=gavin.
This commit is contained in:
parent
3047dd6c7e
commit
b371c503be
@ -1091,13 +1091,13 @@ LoginManager.prototype = {
|
||||
// If username was specified in the form, only fill in the
|
||||
// password if we find a matching login.
|
||||
|
||||
var username = usernameField.value;
|
||||
var username = usernameField.value.toLowerCase();
|
||||
|
||||
var matchingLogin;
|
||||
var found = logins.some(function(l) {
|
||||
matchingLogin = l;
|
||||
return (l.username == username);
|
||||
});
|
||||
matchingLogin = l;
|
||||
return (l.username.toLowerCase() == username);
|
||||
});
|
||||
if (found)
|
||||
selectedLogin = matchingLogin;
|
||||
else
|
||||
|
@ -58,6 +58,12 @@ Login Manager test: forms with 1 password field, part 2
|
||||
<button type='submit'>Submit</button>
|
||||
</form>
|
||||
|
||||
<form id='form9' action='formtest.js'> 9
|
||||
<input type='text' name='uname' value='TESTUSER'>
|
||||
<input type='password' name='pname' value=''>
|
||||
<button type='submit'>Submit</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<pre id="test">
|
||||
@ -68,11 +74,14 @@ Login Manager test: forms with 1 password field, part 2
|
||||
function startTest() {
|
||||
var f;
|
||||
|
||||
// Test various combinations of disabled/readonly inputs
|
||||
checkForm(1, "testpass"); // control
|
||||
checkUnmodifiedForm(2);
|
||||
checkUnmodifiedForm(3);
|
||||
checkForm(4, "testuser", "testpass"); // control
|
||||
for (f = 5; f <= 8; f++) { checkUnmodifiedForm(f); }
|
||||
// Test case-insensitive comparison of username field
|
||||
checkForm(9, "testuser", "testpass");
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user