diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index c23869342ef8..cebd87a733f7 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1644,9 +1644,6 @@ pref("security.app_menu.recordEventTelemetry", true); // Block insecure active content on https pages pref("security.mixed_content.block_active_content", true); -// Show in-content login form warning UI for insecure login fields -pref("security.insecure_field_warning.contextual.enabled", true); - // Show degraded UI for http pages. pref("security.insecure_connection_icon.enabled", true); // Show degraded UI for http pages in private mode. diff --git a/browser/components/enterprisepolicies/Policies.jsm b/browser/components/enterprisepolicies/Policies.jsm index 4ca0480127ea..693168c070b3 100644 --- a/browser/components/enterprisepolicies/Policies.jsm +++ b/browser/components/enterprisepolicies/Policies.jsm @@ -1719,7 +1719,6 @@ var Policies = { "security.default_personal_cert", "security.insecure_connection_text.enabled", "security.insecure_connection_text.pbmode.enabled", - "security.insecure_field_warning.contextual.enabled", "security.mixed_content.block_active_content", "security.osclientcerts.autoload", "security.ssl.errorReporting.enabled", diff --git a/mobile/android/app/geckoview-prefs.js b/mobile/android/app/geckoview-prefs.js index 35092e25a647..09c58d531d0f 100644 --- a/mobile/android/app/geckoview-prefs.js +++ b/mobile/android/app/geckoview-prefs.js @@ -75,7 +75,6 @@ pref("dom.ipc.processPriorityManager.enabled", true); pref("signon.debug", false); pref("signon.showAutoCompleteFooter", true); -pref("security.insecure_field_warning.contextual.enabled", true); pref("toolkit.autocomplete.delegate", true); // Android doesn't support the new sync storage yet, we will have our own in diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index d34c9e1da540..1d68bbaeaa06 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -2054,7 +2054,6 @@ pref("security.notification_enable_delay", 500); #endif // Insecure Form Field Warning -pref("security.insecure_field_warning.contextual.enabled", false); pref("security.insecure_field_warning.ignore_local_ip_address", true); // Remote settings preferences diff --git a/toolkit/components/formautofill/ProfileAutoCompleteResult.jsm b/toolkit/components/formautofill/ProfileAutoCompleteResult.jsm index 50e855c1c5b4..38546002ef82 100644 --- a/toolkit/components/formautofill/ProfileAutoCompleteResult.jsm +++ b/toolkit/components/formautofill/ProfileAutoCompleteResult.jsm @@ -5,10 +5,12 @@ "use strict"; var EXPORTED_SYMBOLS = ["AddressResult", "CreditCardResult"]; - const { XPCOMUtils } = ChromeUtils.import( "resource://gre/modules/XPCOMUtils.jsm" ); +const { FormAutofill } = ChromeUtils.import( + "resource://autofill/FormAutofill.jsm" +); const lazy = {}; XPCOMUtils.defineLazyModuleGetters(lazy, { @@ -16,11 +18,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, { FormAutofillUtils: "resource://autofill/FormAutofillUtils.jsm", }); -XPCOMUtils.defineLazyPreferenceGetter( - lazy, - "insecureWarningEnabled", - "security.insecure_field_warning.contextual.enabled" -); +FormAutofill.defineLazyLogGetter(lazy, EXPORTED_SYMBOLS[0]); class ProfileAutoCompleteResult { constructor( @@ -382,9 +380,6 @@ class CreditCardResult extends ProfileAutoCompleteResult { _generateLabels(focusedFieldName, allFieldNames, profiles) { if (!this._isSecure) { - if (!lazy.insecureWarningEnabled) { - return []; - } let brandName = lazy.FormAutofillUtils.brandBundle.GetStringFromName( "brandShortName" ); @@ -475,7 +470,7 @@ class CreditCardResult extends ProfileAutoCompleteResult { getStyleAt(index) { this._checkIndexBounds(index); - if (!this._isSecure && lazy.insecureWarningEnabled) { + if (!this._isSecure) { return "autofill-insecureWarning"; } diff --git a/toolkit/components/passwordmgr/LoginAutoComplete.jsm b/toolkit/components/passwordmgr/LoginAutoComplete.jsm index 167f2d262b82..207390d7bd37 100644 --- a/toolkit/components/passwordmgr/LoginAutoComplete.jsm +++ b/toolkit/components/passwordmgr/LoginAutoComplete.jsm @@ -349,8 +349,8 @@ class LoginAutoCompleteResult { this.searchString = aSearchString; - // Insecure field warning comes first if it applies and is enabled. - if (!isSecure && lazy.LoginHelper.showInsecureFieldWarning) { + // Insecure field warning comes first. + if (!isSecure) { this.#rows.push(new InsecureLoginFormAutocompleteItem()); } diff --git a/toolkit/components/passwordmgr/LoginHelper.jsm b/toolkit/components/passwordmgr/LoginHelper.jsm index b3e5784cd6d0..3133c9c8d478 100644 --- a/toolkit/components/passwordmgr/LoginHelper.jsm +++ b/toolkit/components/passwordmgr/LoginHelper.jsm @@ -1790,12 +1790,6 @@ const LoginHelper = { }, }; -XPCOMUtils.defineLazyPreferenceGetter( - LoginHelper, - "showInsecureFieldWarning", - "security.insecure_field_warning.contextual.enabled" -); - XPCOMUtils.defineLazyGetter(lazy, "log", () => { let processName = Services.appinfo.processType === Services.appinfo.PROCESS_TYPE_DEFAULT diff --git a/toolkit/components/passwordmgr/LoginManagerChild.jsm b/toolkit/components/passwordmgr/LoginManagerChild.jsm index 6ee61514a1f9..04330bb99e1a 100644 --- a/toolkit/components/passwordmgr/LoginManagerChild.jsm +++ b/toolkit/components/passwordmgr/LoginManagerChild.jsm @@ -2867,8 +2867,7 @@ class LoginManagerChild extends JSWindowActorChild { if ( !foundLogins.length && !(importable?.state === "import" && importable?.browsers) && - (lazy.InsecurePasswordUtils.isFormSecure(form) || - !lazy.LoginHelper.showInsecureFieldWarning) + lazy.InsecurePasswordUtils.isFormSecure(form) ) { // We don't log() here since this is a very common case. autofillResult = AUTOFILL_RESULT.NO_SAVED_LOGINS; diff --git a/toolkit/components/passwordmgr/test/mochitest/mochitest.ini b/toolkit/components/passwordmgr/test/mochitest/mochitest.ini index 61b59c9ff417..ca055f139704 100644 --- a/toolkit/components/passwordmgr/test/mochitest/mochitest.ini +++ b/toolkit/components/passwordmgr/test/mochitest/mochitest.ini @@ -5,7 +5,6 @@ prefs = signon.showAutoCompleteFooter=true signon.testOnlyUserHasInteractedByPrefValue=true signon.testOnlyUserHasInteractedWithDocument=true - security.insecure_field_warning.contextual.enabled=false network.auth.non-web-content-triggered-resources-http-auth-allow=true # signon.relatedRealms.enabled pref needed until Bug 1699698 lands signon.relatedRealms.enabled=true diff --git a/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_basic_form_insecure.html b/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_basic_form_insecure.html index f0e0658d3f1e..372c04980b59 100644 --- a/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_basic_form_insecure.html +++ b/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_basic_form_insecure.html @@ -128,7 +128,6 @@ function spinEventLoop() { } add_task(async function setup() { - await SpecialPowers.pushPrefEnv({"set": [["security.insecure_field_warning.contextual.enabled", true]]}); listenForUnexpectedPopupShown(); }); diff --git a/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_highlight_non_login.html b/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_highlight_non_login.html index 24cac0ebe5ad..4e68fe2e5407 100644 --- a/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_highlight_non_login.html +++ b/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_highlight_non_login.html @@ -35,8 +35,6 @@ let password = document.getElementById("pword"); add_task(async function setup() { ok(readyPromise, "check promise is available"); await readyPromise; - - await SpecialPowers.pushPrefEnv({"set": [["security.insecure_field_warning.contextual.enabled", true]]}); }); add_task(async function test_field_highlight_on_pw_field_autocomplete_insecureWarning() { diff --git a/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_https_downgrade.html b/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_https_downgrade.html index ba85ab2dcf05..40f59b9be6a3 100644 --- a/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_https_downgrade.html +++ b/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_https_downgrade.html @@ -100,7 +100,7 @@ add_task(async function test_autocomplete_https_downgrade() { info("got results: " + results.join(", ")); popupState = await getPopupState(); is(popupState.selectedIndex, -1, "Check no entries are selected"); - checkAutoCompleteResults(results, ["name1", "name2"], hostname, "initial"); + checkAutoCompleteResults(results, ["This connection is not secure. Logins entered here could be compromised. Learn More", "name1", "name2"], hostname, "initial"); }); diff --git a/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_sandboxed.html b/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_sandboxed.html index 079fe6c4f9d8..eeba00792405 100644 --- a/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_sandboxed.html +++ b/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_sandboxed.html @@ -40,10 +40,6 @@ let pword; let hostname; add_task(async function setup() { - await SpecialPowers.pushPrefEnv({"set": [ - ["security.insecure_field_warning.contextual.enabled", true], - ]}); - let frameWindow = SpecialPowers.wrap(sandboxed).contentWindow; // Can't use SimpleTest.promiseFocus as it doesn't work with the sandbox. await SimpleTest.promiseWaitForCondition(() => { diff --git a/toolkit/components/passwordmgr/test/mochitest/test_autofill_sandboxed.html b/toolkit/components/passwordmgr/test/mochitest/test_autofill_sandboxed.html index 9ca421da80dc..96bb725a9adb 100644 --- a/toolkit/components/passwordmgr/test/mochitest/test_autofill_sandboxed.html +++ b/toolkit/components/passwordmgr/test/mochitest/test_autofill_sandboxed.html @@ -52,12 +52,6 @@ function promiseExecuteSoon() { return new Promise(SimpleTest.executeSoon); } -add_task(async function setup() { - await SpecialPowers.pushPrefEnv({"set": [ - ["security.insecure_field_warning.contextual.enabled", true], - ]}); -}); - add_task(async function test_no_autofill_in_form() { sandboxed.src = "form_basic.html"; let frameWindow = SpecialPowers.wrap(sandboxed).contentWindow; diff --git a/toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_no_saved_login.html b/toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_no_saved_login.html index ea8d59d4876d..d3a3633a10ec 100644 --- a/toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_no_saved_login.html +++ b/toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_no_saved_login.html @@ -33,17 +33,6 @@ let chromeScript = runChecksAfterCommonInit(); /** Test for Login Manager: contextual insecure password warning without saved logins. **/ -// Set to pref before the document loads. -let originalInsecureEnabled = SpecialPowers.getBoolPref( - "security.insecure_field_warning.contextual.enabled"); -SpecialPowers.setBoolPref( - "security.insecure_field_warning.contextual.enabled", true); - -SimpleTest.registerCleanupFunction(() => { - SpecialPowers.setBoolPref( - "security.insecure_field_warning.contextual.enabled", originalInsecureEnabled); -}); - let uname = $_(1, "uname"); let pword = $_(1, "pword"); diff --git a/toolkit/components/passwordmgr/test/mochitest/test_password_field_autocomplete.html b/toolkit/components/passwordmgr/test/mochitest/test_password_field_autocomplete.html index bb5066c9a838..8aaa46e25bc7 100644 --- a/toolkit/components/passwordmgr/test/mochitest/test_password_field_autocomplete.html +++ b/toolkit/components/passwordmgr/test/mochitest/test_password_field_autocomplete.html @@ -15,6 +15,8 @@ Login Manager test: multiple login autocomplete diff --git a/toolkit/components/passwordmgr/test/unit/test_login_autocomplete_result.js b/toolkit/components/passwordmgr/test/unit/test_login_autocomplete_result.js index 92eb59e96469..810e0cc62391 100644 --- a/toolkit/components/passwordmgr/test/unit/test_login_autocomplete_result.js +++ b/toolkit/components/passwordmgr/test/unit/test_login_autocomplete_result.js @@ -7,9 +7,6 @@ let nsLoginInfo = Components.Constructor( "init" ); -const PREF_INSECURE_FIELD_WARNING_ENABLED = - "security.insecure_field_warning.contextual.enabled"; - const PREF_SCHEME_UPGRADES = "signon.schemeUpgrades"; let matchingLogins = []; @@ -102,7 +99,6 @@ add_task(async function test_all_patterns() { let expectedResults = [ { - insecureFieldWarningEnabled: true, isSecure: true, hasBeenTypePassword: false, matchingLogins, @@ -155,7 +151,6 @@ add_task(async function test_all_patterns() { ], }, { - insecureFieldWarningEnabled: true, isSecure: false, hasBeenTypePassword: false, matchingLogins: [], @@ -179,7 +174,6 @@ add_task(async function test_all_patterns() { ], }, { - insecureFieldWarningEnabled: true, isSecure: false, hasBeenTypePassword: false, matchingLogins, @@ -236,7 +230,6 @@ add_task(async function test_all_patterns() { ], }, { - insecureFieldWarningEnabled: true, isSecure: true, hasBeenTypePassword: true, matchingLogins, @@ -286,7 +279,6 @@ add_task(async function test_all_patterns() { ], }, { - insecureFieldWarningEnabled: true, isSecure: false, hasBeenTypePassword: true, matchingLogins, @@ -343,7 +335,6 @@ add_task(async function test_all_patterns() { ], }, { - insecureFieldWarningEnabled: false, isSecure: true, hasBeenTypePassword: false, matchingLogins, @@ -393,435 +384,6 @@ add_task(async function test_all_patterns() { ], }, { - insecureFieldWarningEnabled: false, - isSecure: false, - hasBeenTypePassword: false, - matchingLogins, - items: [ - { - value: "", - label: LABEL_NO_USERNAME, - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "tempuser1", - label: "tempuser1", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "testuser2", - label: "testuser2", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "zzzuser4", - label: "zzzuser4", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "httpuser", - label: "httpuser", - style: "loginWithOrigin", - comment: { comment: "mochi.test:8888 (My HTTP auth realm)" }, - }, - { - value: "testuser3", - label: "testuser3", - style: "loginWithOrigin", - comment: { comment: "sub.mochi.test:8888" }, - }, - { - value: "", - label: "View Saved Logins", - style: "loginsFooter", - comment: { formHostname: "mochi.test" }, - }, - ], - }, - { - insecureFieldWarningEnabled: false, - isSecure: true, - hasBeenTypePassword: true, - matchingLogins, - items: [ - { - value: "emptypass1", - label: LABEL_NO_USERNAME, - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "temppass1", - label: "tempuser1", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "testpass2", - label: "testuser2", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "zzzpass4", - label: "zzzuser4", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "httppass", - label: "httpuser", - style: "loginWithOrigin", - comment: { comment: "mochi.test:8888 (My HTTP auth realm)" }, - }, - { - value: "testpass3", - label: "testuser3", - style: "loginWithOrigin", - comment: { comment: "sub.mochi.test:8888" }, - }, - { - value: "", - label: "View Saved Logins", - style: "loginsFooter", - comment: { formHostname: "mochi.test" }, - }, - ], - }, - { - insecureFieldWarningEnabled: false, - isSecure: false, - hasBeenTypePassword: true, - matchingLogins, - items: [ - { - value: "emptypass1", - label: LABEL_NO_USERNAME, - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "temppass1", - label: "tempuser1", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "testpass2", - label: "testuser2", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "zzzpass4", - label: "zzzuser4", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "httppass", - label: "httpuser", - style: "loginWithOrigin", - comment: { comment: "mochi.test:8888 (My HTTP auth realm)" }, - }, - { - value: "testpass3", - label: "testuser3", - style: "loginWithOrigin", - comment: { comment: "sub.mochi.test:8888" }, - }, - { - value: "", - label: "View Saved Logins", - style: "loginsFooter", - comment: { formHostname: "mochi.test" }, - }, - ], - }, - { - insecureFieldWarningEnabled: true, - isSecure: true, - hasBeenTypePassword: false, - matchingLogins, - items: [ - { - value: "", - label: LABEL_NO_USERNAME, - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "tempuser1", - label: "tempuser1", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "testuser2", - label: "testuser2", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "zzzuser4", - label: "zzzuser4", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "httpuser", - label: "httpuser", - style: "loginWithOrigin", - comment: { comment: "mochi.test:8888 (My HTTP auth realm)" }, - }, - { - value: "testuser3", - label: "testuser3", - style: "loginWithOrigin", - comment: { comment: "sub.mochi.test:8888" }, - }, - { - value: "", - label: "View Saved Logins", - style: "loginsFooter", - comment: { formHostname: "mochi.test" }, - }, - ], - }, - { - insecureFieldWarningEnabled: true, - isSecure: false, - hasBeenTypePassword: false, - matchingLogins, - items: [ - { - value: "", - label: - "This connection is not secure. Logins entered here could be compromised. Learn More", - style: "insecureWarning", - comment: "", - }, - { - value: "", - label: LABEL_NO_USERNAME, - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "tempuser1", - label: "tempuser1", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "testuser2", - label: "testuser2", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "zzzuser4", - label: "zzzuser4", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "httpuser", - label: "httpuser", - style: "loginWithOrigin", - comment: { comment: "mochi.test:8888 (My HTTP auth realm)" }, - }, - { - value: "testuser3", - label: "testuser3", - style: "loginWithOrigin", - comment: { comment: "sub.mochi.test:8888" }, - }, - { - value: "", - label: "View Saved Logins", - style: "loginsFooter", - comment: { formHostname: "mochi.test" }, - }, - ], - }, - { - insecureFieldWarningEnabled: true, - isSecure: true, - hasBeenTypePassword: true, - matchingLogins, - items: [ - { - value: "emptypass1", - label: LABEL_NO_USERNAME, - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "temppass1", - label: "tempuser1", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "testpass2", - label: "testuser2", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "zzzpass4", - label: "zzzuser4", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "httppass", - label: "httpuser", - style: "loginWithOrigin", - comment: { comment: "mochi.test:8888 (My HTTP auth realm)" }, - }, - { - value: "testpass3", - label: "testuser3", - style: "loginWithOrigin", - comment: { comment: "sub.mochi.test:8888" }, - }, - { - value: "", - label: "View Saved Logins", - style: "loginsFooter", - comment: { formHostname: "mochi.test" }, - }, - ], - }, - { - insecureFieldWarningEnabled: true, - isSecure: false, - hasBeenTypePassword: true, - matchingLogins, - items: [ - { - value: "", - label: - "This connection is not secure. Logins entered here could be compromised. Learn More", - style: "insecureWarning", - comment: "", - }, - { - value: "emptypass1", - label: LABEL_NO_USERNAME, - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "temppass1", - label: "tempuser1", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "testpass2", - label: "testuser2", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "zzzpass4", - label: "zzzuser4", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "httppass", - label: "httpuser", - style: "loginWithOrigin", - comment: { comment: "mochi.test:8888 (My HTTP auth realm)" }, - }, - { - value: "testpass3", - label: "testuser3", - style: "loginWithOrigin", - comment: { comment: "sub.mochi.test:8888" }, - }, - { - value: "", - label: "View Saved Logins", - style: "loginsFooter", - comment: { formHostname: "mochi.test" }, - }, - ], - }, - { - insecureFieldWarningEnabled: false, - isSecure: true, - hasBeenTypePassword: false, - matchingLogins, - items: [ - { - value: "", - label: LABEL_NO_USERNAME, - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "tempuser1", - label: "tempuser1", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "testuser2", - label: "testuser2", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "zzzuser4", - label: "zzzuser4", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "httpuser", - label: "httpuser", - style: "loginWithOrigin", - comment: { comment: "mochi.test:8888 (My HTTP auth realm)" }, - }, - { - value: "testuser3", - label: "testuser3", - style: "loginWithOrigin", - comment: { comment: "sub.mochi.test:8888" }, - }, - { - value: "", - label: "View Saved Logins", - style: "loginsFooter", - comment: { formHostname: "mochi.test" }, - }, - ], - }, - { - insecureFieldWarningEnabled: false, - isSecure: false, - hasBeenTypePassword: false, - matchingLogins: [], - items: [ - { - value: "", - label: "View Saved Logins", - style: "loginsFooter", - comment: { formHostname: "mochi.test" }, - }, - ], - }, - { - insecureFieldWarningEnabled: false, isSecure: false, hasBeenTypePassword: false, matchingLogins: [], @@ -829,53 +391,10 @@ add_task(async function test_all_patterns() { items: [ { value: "", - label: "View Saved Logins", - style: "loginsFooter", - comment: { formHostname: "mochi.test" }, - }, - ], - }, - { - insecureFieldWarningEnabled: false, - isSecure: false, - hasBeenTypePassword: false, - matchingLogins, - items: [ - { - value: "", - label: LABEL_NO_USERNAME, - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "tempuser1", - label: "tempuser1", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "testuser2", - label: "testuser2", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "zzzuser4", - label: "zzzuser4", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "httpuser", - label: "httpuser", - style: "loginWithOrigin", - comment: { comment: "mochi.test:8888 (My HTTP auth realm)" }, - }, - { - value: "testuser3", - label: "testuser3", - style: "loginWithOrigin", - comment: { comment: "sub.mochi.test:8888" }, + label: + "This connection is not secure. Logins entered here could be compromised. Learn More", + style: "insecureWarning", + comment: "", }, { value: "", @@ -886,107 +405,6 @@ add_task(async function test_all_patterns() { ], }, { - insecureFieldWarningEnabled: false, - isSecure: true, - hasBeenTypePassword: true, - matchingLogins, - items: [ - { - value: "emptypass1", - label: LABEL_NO_USERNAME, - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "temppass1", - label: "tempuser1", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "testpass2", - label: "testuser2", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "zzzpass4", - label: "zzzuser4", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "httppass", - label: "httpuser", - style: "loginWithOrigin", - comment: { comment: "mochi.test:8888 (My HTTP auth realm)" }, - }, - { - value: "testpass3", - label: "testuser3", - style: "loginWithOrigin", - comment: { comment: "sub.mochi.test:8888" }, - }, - { - value: "", - label: "View Saved Logins", - style: "loginsFooter", - comment: { formHostname: "mochi.test" }, - }, - ], - }, - { - insecureFieldWarningEnabled: false, - isSecure: false, - hasBeenTypePassword: true, - matchingLogins, - items: [ - { - value: "emptypass1", - label: LABEL_NO_USERNAME, - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "temppass1", - label: "tempuser1", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "testpass2", - label: "testuser2", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "zzzpass4", - label: "zzzuser4", - style: "loginWithOrigin", - comment: { comment: EXACT_ORIGIN_MATCH_COMMENT }, - }, - { - value: "httppass", - label: "httpuser", - style: "loginWithOrigin", - comment: { comment: "mochi.test:8888 (My HTTP auth realm)" }, - }, - { - value: "testpass3", - label: "testuser3", - style: "loginWithOrigin", - comment: { comment: "sub.mochi.test:8888" }, - }, - { - value: "", - label: "View Saved Logins", - style: "loginsFooter", - comment: { formHostname: "mochi.test" }, - }, - ], - }, - { - insecureFieldWarningEnabled: true, isSecure: true, hasBeenTypePassword: true, matchingLogins: [], @@ -1000,7 +418,6 @@ add_task(async function test_all_patterns() { ], }, { - insecureFieldWarningEnabled: true, isSecure: true, hasBeenTypePassword: true, matchingLogins: [], @@ -1009,7 +426,6 @@ add_task(async function test_all_patterns() { }, { generatedPassword: "9ljgfd4shyktb45", - insecureFieldWarningEnabled: true, isSecure: true, hasBeenTypePassword: true, matchingLogins: [], @@ -1036,7 +452,6 @@ add_task(async function test_all_patterns() { "willAutoSaveGeneratedPassword should propagate to the comment", generatedPassword: "9ljgfd4shyktb45", willAutoSaveGeneratedPassword: true, - insecureFieldWarningEnabled: true, isSecure: true, hasBeenTypePassword: true, matchingLogins: [], @@ -1062,7 +477,6 @@ add_task(async function test_all_patterns() { description: "If a generated password is passed then show it even if there is a search string. This handles when forcing the generation option from the context menu of a non-empty field", generatedPassword: "9ljgfd4shyktb45", - insecureFieldWarningEnabled: true, isSecure: true, hasBeenTypePassword: true, matchingLogins: [], @@ -1088,7 +502,6 @@ add_task(async function test_all_patterns() { { description: "secure username field on sub.mochi.test", formOrigin: "https://sub.mochi.test:8888", - insecureFieldWarningEnabled: true, isSecure: true, hasBeenTypePassword: false, matchingLogins, @@ -1140,7 +553,6 @@ add_task(async function test_all_patterns() { { description: "secure password field on sub.mochi.test", formOrigin: "https://sub.mochi.test:8888", - insecureFieldWarningEnabled: true, isSecure: true, hasBeenTypePassword: true, matchingLogins, @@ -1250,10 +662,6 @@ add_task(async function test_all_patterns() { expectedResults.forEach((pattern, testIndex) => { info(`expectedResults[${testIndex}]`); info(JSON.stringify(pattern, null, 2)); - Services.prefs.setBoolPref( - PREF_INSECURE_FIELD_WARNING_ENABLED, - pattern.insecureFieldWarningEnabled - ); Services.prefs.setBoolPref( PREF_SCHEME_UPGRADES, "schemeUpgrades" in pattern ? pattern.schemeUpgrades : true