зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1604472 - Use documentPrincipal.origin when looking up generated passwords onFormSubmit. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D57721 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
62cfa9f435
Коммит
4a35d16a80
|
@ -1595,9 +1595,11 @@ this.LoginManagerChild = class LoginManagerChild extends JSWindowActorChild {
|
|||
}
|
||||
|
||||
let autoFilledLogin = docState.fillsByRootElement.get(form.rootElement);
|
||||
let browsingContextId = win.getWindowGlobalChild().browsingContext.id;
|
||||
|
||||
let detail = {
|
||||
origin,
|
||||
browsingContextId,
|
||||
formActionOrigin,
|
||||
autoFilledLoginGuid: autoFilledLogin && autoFilledLogin.guid,
|
||||
usernameField: mockUsername,
|
||||
|
|
|
@ -571,6 +571,7 @@ class LoginManagerParent extends JSWindowActorParent {
|
|||
browser,
|
||||
{
|
||||
origin,
|
||||
browsingContextId,
|
||||
formActionOrigin,
|
||||
autoFilledLoginGuid,
|
||||
usernameField,
|
||||
|
@ -603,6 +604,11 @@ class LoginManagerParent extends JSWindowActorParent {
|
|||
return;
|
||||
}
|
||||
|
||||
let browsingContext = BrowsingContext.get(browsingContextId);
|
||||
let framePrincipalOrigin =
|
||||
browsingContext.currentWindowGlobal.documentPrincipal.origin;
|
||||
log("onFormSubmit, got framePrincipalOrigin: ", framePrincipalOrigin);
|
||||
|
||||
let formLogin = new LoginInfo(
|
||||
origin,
|
||||
formActionOrigin,
|
||||
|
@ -635,7 +641,9 @@ class LoginManagerParent extends JSWindowActorParent {
|
|||
formActionOrigin,
|
||||
});
|
||||
|
||||
let generatedPW = gGeneratedPasswordsByPrincipalOrigin.get(origin);
|
||||
let generatedPW = gGeneratedPasswordsByPrincipalOrigin.get(
|
||||
framePrincipalOrigin
|
||||
);
|
||||
let autoSavedStorageGUID = "";
|
||||
if (generatedPW && generatedPW.storageGUID) {
|
||||
autoSavedStorageGUID = generatedPW.storageGUID;
|
||||
|
|
Загрузка…
Ссылка в новой задаче