зеркало из https://github.com/mozilla/pjs.git
Bug 234770: Password field names are used instead of username field names to find acceptable signons, patch by Michael Wu <michael.wu@mozilla.com>, r=enndeakin
This commit is contained in:
Родитель
13275df82a
Коммит
00cca42af3
|
@ -1801,6 +1801,7 @@ nsPasswordManager::FillDocument(nsIDOMDocument* aDomDoc)
|
|||
form->GetElementCount(&count);
|
||||
PRUint32 i;
|
||||
nsCOMPtr<nsIFormControl> formControl;
|
||||
userField = nsnull;
|
||||
for (i = 0; i < count; i++) {
|
||||
form->GetElementAt(i, getter_AddRefs(formControl));
|
||||
|
||||
|
@ -1820,6 +1821,10 @@ nsPasswordManager::FillDocument(nsIDOMDocument* aDomDoc)
|
|||
}
|
||||
}
|
||||
|
||||
// Bail out if we should be seeing a userField but we're not
|
||||
if (!userField && !(e->userField).IsEmpty())
|
||||
continue;
|
||||
|
||||
if (!(e->passField).IsEmpty()) {
|
||||
form->ResolveName(e->passField, getter_AddRefs(foundNode));
|
||||
temp = do_QueryInterface(foundNode);
|
||||
|
|
Загрузка…
Ссылка в новой задаче