[PALEMOON] [Frontend vs Backend] Password Manager: InsecurePasswordUtils.checkForInsecurePasswords is not a function

This commit is contained in:
janekptacijarabaci 2018-04-12 09:24:59 +02:00 • committed by Roy Tam
commit d42b40ac91

View file

@ -13,6 +13,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "BrowserUtils",
"resource://gre/modules/BrowserUtils.jsm"); "resource://gre/modules/BrowserUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "LoginManagerContent", XPCOMUtils.defineLazyModuleGetter(this, "LoginManagerContent",
"resource://gre/modules/LoginManagerContent.jsm"); "resource://gre/modules/LoginManagerContent.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "LoginFormFactory",
"resource://gre/modules/LoginManagerContent.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "InsecurePasswordUtils", XPCOMUtils.defineLazyModuleGetter(this, "InsecurePasswordUtils",
"resource://gre/modules/InsecurePasswordUtils.jsm"); "resource://gre/modules/InsecurePasswordUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "FormSubmitObserver", XPCOMUtils.defineLazyModuleGetter(this, "FormSubmitObserver",
@ -47,8 +49,9 @@ addMessageListener("Browser:HideSessionRestoreButton", function (message) {
}); });
addEventListener("DOMFormHasPassword", function(event) { addEventListener("DOMFormHasPassword", function(event) {
InsecurePasswordUtils.checkForInsecurePasswords(event.target); LoginManagerContent.onDOMFormHasPassword(event, content);
LoginManagerContent.onFormPassword(event); let formLike = LoginFormFactory.createFromForm(event.target);
InsecurePasswordUtils.reportInsecurePasswords(formLike);
}); });
addEventListener("DOMAutoComplete", function(event) { addEventListener("DOMAutoComplete", function(event) {
LoginManagerContent.onUsernameInput(event); LoginManagerContent.onUsernameInput(event);