зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1550171 - Don't apply Password Manager to about: pages. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D37998 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
6d4b358fc8
Коммит
d046711c81
|
@ -40,9 +40,10 @@ addMessageListener("PasswordManager:fillGeneratedPassword", function(message) {
|
|||
});
|
||||
|
||||
function shouldIgnoreLoginManagerEvent(event) {
|
||||
let nodePrincipal = event.target.nodePrincipal;
|
||||
// If we have a null principal then prevent any more password manager code from running and
|
||||
// incorrectly using the document `location`.
|
||||
return event.target.nodePrincipal.isNullPrincipal;
|
||||
// incorrectly using the document `location`. Also skip password manager for about: pages.
|
||||
return nodePrincipal.isNullPrincipal || nodePrincipal.URI.schemeIs("about");
|
||||
}
|
||||
|
||||
addEventListener("DOMFormBeforeSubmit", function(event) {
|
||||
|
|
|
@ -212,9 +212,12 @@ BrowserCLH.prototype = {
|
|||
}
|
||||
|
||||
function shouldIgnoreLoginManagerEvent(event) {
|
||||
let nodePrincipal = event.target.nodePrincipal;
|
||||
// If we have a null principal then prevent any more password manager code from running and
|
||||
// incorrectly using the document `location`.
|
||||
return event.target.nodePrincipal.isNullPrincipal;
|
||||
// incorrectly using the document `location`. Also skip password manager for about: pages.
|
||||
return (
|
||||
nodePrincipal.isNullPrincipal || nodePrincipal.URI.schemeIs("about")
|
||||
);
|
||||
}
|
||||
|
||||
let options = {
|
||||
|
|
Загрузка…
Ссылка в новой задаче