Bug 327977 – Password manager overwrites page data for password-only forms. r=gavin

This commit is contained in:
Justin Dolske 2008-07-18 14:18:05 -07:00
parent 6f5cd1aa07
commit fa5a4ce61a
2 changed files with 6 additions and 2 deletions

View File

@ -1002,6 +1002,11 @@ LoginManager.prototype = {
if (passwordField == null)
return [false, foundLogins];
// If there's only a password field and it has a value, there's
// nothing for us to do. (Don't clobber the existing value)
if (!usernameField && passwordField.value)
return [false, foundLogins];
// Need to get a list of logins if we weren't given them
if (foundLogins == null) {
var formOrigin =

View File

@ -2741,8 +2741,7 @@ function startTest() {
var f;
for (f = 1; f <= 4; f++) { checkForm(f, "testpass"); }
todo(false, "Don't clobber prefilled differing password");
//for (f = 5; f <= 6; f++) { checkUnmodifiedForm(f); }
for (f = 5; f <= 6; f++) { checkUnmodifiedForm(f); }
for (f = 7; f <= 14; f++) { checkForm(f, "testuser", "testpass"); }
todo(false, "Don't clobber prefilled differing password");
//for (f = 15; f <= 18; f++) { checkUnmodifiedForm(f); }