зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1773047 - Remove the `security.insecure_field_warning.contextual.enabled` pref r=dimi,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D149550
This commit is contained in:
Родитель
98b2d98e03
Коммит
110f8e9de2
|
@ -1645,9 +1645,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.
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2040,7 +2040,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
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["AddressResult", "CreditCardResult"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
|
@ -16,12 +15,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
FormAutofillUtils: "resource://autofill/FormAutofillUtils.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
lazy,
|
||||
"insecureWarningEnabled",
|
||||
"security.insecure_field_warning.contextual.enabled"
|
||||
);
|
||||
|
||||
class ProfileAutoCompleteResult {
|
||||
constructor(
|
||||
searchString,
|
||||
|
@ -382,9 +375,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 +465,7 @@ class CreditCardResult extends ProfileAutoCompleteResult {
|
|||
|
||||
getStyleAt(index) {
|
||||
this._checkIndexBounds(index);
|
||||
if (!this._isSecure && lazy.insecureWarningEnabled) {
|
||||
if (!this._isSecure) {
|
||||
return "autofill-insecureWarning";
|
||||
}
|
||||
|
||||
|
|
|
@ -331,8 +331,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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2841,8 +2841,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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -128,7 +128,6 @@ function spinEventLoop() {
|
|||
}
|
||||
|
||||
add_task(async function setup() {
|
||||
await SpecialPowers.pushPrefEnv({"set": [["security.insecure_field_warning.contextual.enabled", true]]});
|
||||
listenForUnexpectedPopupShown();
|
||||
});
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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");
|
||||
});
|
||||
</script>
|
||||
</pre>
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@ Login Manager test: multiple login autocomplete
|
|||
<script>
|
||||
var chromeScript = runChecksAfterCommonInit();
|
||||
|
||||
const INSECURE_WARNING_TEXT = "This connection is not secure. Logins entered here could be compromised. Learn More";
|
||||
|
||||
let origin = window.location.origin;
|
||||
addLoginsInParent(
|
||||
// login0 has no username, so should be filtered out from the autocomplete list.
|
||||
|
@ -97,18 +99,60 @@ const DATE_NOW_STRING = generateDateString(new Date());
|
|||
// Check for expected username/password in form.
|
||||
function checkACFormPasswordField(expectedPassword) {
|
||||
var formID = uname.parentNode.id;
|
||||
is(pword.value, expectedPassword, "Checking " + formID + " password is: " + expectedPassword);
|
||||
is(pword.value, expectedPassword, "Checking " + formID + " password is: " + JSON.stringify(expectedPassword));
|
||||
}
|
||||
|
||||
function spinEventLoop() {
|
||||
return Promise.resolve();
|
||||
async function userOpenAutocompleteOnForm1(autoFillInsecureForms) {
|
||||
await SpecialPowers.pushPrefEnv({"set": [
|
||||
["signon.autofillForms.http", autoFillInsecureForms],
|
||||
]});
|
||||
await reinitializeForm(1);
|
||||
// Trigger autocomplete popup
|
||||
const shownPromise = promiseACShown();
|
||||
synthesizeKey("KEY_ArrowDown"); // open
|
||||
const results = await shownPromise;
|
||||
|
||||
const popupState = await getPopupState();
|
||||
is(popupState.selectedIndex, -1, "Check no entries are selected upon opening");
|
||||
|
||||
const expectedMenuItems = [INSECURE_WARNING_TEXT,
|
||||
"No username (" + DATE_NOW_STRING + ")",
|
||||
"tempuser1",
|
||||
"testuser2",
|
||||
"testuser3",
|
||||
"zzzuser4"];
|
||||
checkAutoCompleteResults(results, expectedMenuItems, "mochi.test", "Check all menuitems are displayed correctly.");
|
||||
}
|
||||
|
||||
async function userPressedDown_passwordIs(value) {
|
||||
synthesizeKey("KEY_ArrowDown");
|
||||
await Promise.resolve(); // let focus happen
|
||||
checkACFormPasswordField(value);
|
||||
}
|
||||
|
||||
async function userPressedEnter_passwordIs(value) {
|
||||
synthesizeKey("KEY_Enter");
|
||||
await Promise.resolve(); // let focus happen
|
||||
checkACFormPasswordField(value);
|
||||
}
|
||||
|
||||
async function noPopupOnForm(formIndex, reason) {
|
||||
await SpecialPowers.pushPrefEnv({"set": [
|
||||
["signon.autofillForms.http", true],
|
||||
]});
|
||||
await reinitializeForm(formIndex);
|
||||
|
||||
// Trigger autocomplete popup
|
||||
synthesizeKey("KEY_ArrowDown"); // open
|
||||
let popupState = await getPopupState();
|
||||
is(popupState.open, false, reason);
|
||||
}
|
||||
|
||||
add_task(async function setup() {
|
||||
listenForUnexpectedPopupShown();
|
||||
});
|
||||
|
||||
add_task(async function test_form1_initial_empty() {
|
||||
add_task(async function form1_initial_empty() {
|
||||
await SimpleTest.promiseFocus(window);
|
||||
|
||||
// Make sure initial form is empty.
|
||||
|
@ -117,131 +161,38 @@ add_task(async function test_form1_initial_empty() {
|
|||
is(popupState.open, false, "Check popup is initially closed");
|
||||
});
|
||||
|
||||
add_task(async function test_form2_password_readonly() {
|
||||
await SpecialPowers.pushPrefEnv({"set": [
|
||||
["security.insecure_field_warning.contextual.enabled", true],
|
||||
["signon.autofillForms.http", true],
|
||||
]});
|
||||
await reinitializeForm(2);
|
||||
|
||||
// Trigger autocomplete popup
|
||||
synthesizeKey("KEY_ArrowDown"); // open
|
||||
let popupState = await getPopupState();
|
||||
is(popupState.open, false, "Check popup is closed for a readonly field.");
|
||||
add_task(async function noAutocompleteForReadonlyField() {
|
||||
await noPopupOnForm(2, "Check popup is closed for a readonly field.");
|
||||
});
|
||||
|
||||
add_task(async function test_form3_password_disabled() {
|
||||
await SpecialPowers.pushPrefEnv({"set": [
|
||||
["security.insecure_field_warning.contextual.enabled", true],
|
||||
["signon.autofillForms.http", true],
|
||||
]});
|
||||
await reinitializeForm(3);
|
||||
|
||||
// Trigger autocomplete popup
|
||||
synthesizeKey("KEY_ArrowDown"); // open
|
||||
let popupState = await getPopupState();
|
||||
is(popupState.open, false, "Check popup is closed for a disabled field.");
|
||||
add_task(async function noAutocompleteForDisabledField() {
|
||||
await noPopupOnForm(3, "Check popup is closed for a disabled field.");
|
||||
});
|
||||
|
||||
add_task(async function test_form1_enabledInsecureFieldWarning_enabledInsecureAutoFillForm() {
|
||||
await SpecialPowers.pushPrefEnv({"set": [
|
||||
["security.insecure_field_warning.contextual.enabled", true],
|
||||
["signon.autofillForms.http", true],
|
||||
]});
|
||||
await reinitializeForm(1);
|
||||
// Trigger autocomplete popup
|
||||
let shownPromise = promiseACShown();
|
||||
synthesizeKey("KEY_ArrowDown"); // open
|
||||
let results = await shownPromise;
|
||||
|
||||
let popupState = await getPopupState();
|
||||
is(popupState.selectedIndex, -1, "Check no entries are selected upon opening");
|
||||
|
||||
let expectedMenuItems = ["This connection is not secure. Logins entered here could be compromised. Learn More",
|
||||
"No username (" + DATE_NOW_STRING + ")",
|
||||
"tempuser1",
|
||||
"testuser2",
|
||||
"testuser3",
|
||||
"zzzuser4"];
|
||||
checkAutoCompleteResults(results, expectedMenuItems, "mochi.test", "Check all menuitems are displayed correctly.");
|
||||
|
||||
synthesizeKey("KEY_ArrowDown"); // select insecure warning
|
||||
checkACFormPasswordField(""); // value shouldn't update just by selecting
|
||||
synthesizeKey("KEY_Enter");
|
||||
await spinEventLoop(); // let focus happen
|
||||
checkACFormPasswordField("");
|
||||
add_task(async function insecureAutoFill_EnterOnWarning() {
|
||||
await userOpenAutocompleteOnForm1(true);
|
||||
await userPressedDown_passwordIs("");
|
||||
await userPressedEnter_passwordIs("");
|
||||
});
|
||||
|
||||
add_task(async function test_form1_disabledInsecureFieldWarning_enabledInsecureAutoFillForm() {
|
||||
await SpecialPowers.pushPrefEnv({"set": [
|
||||
["security.insecure_field_warning.contextual.enabled", false],
|
||||
["signon.autofillForms.http", true],
|
||||
]});
|
||||
await reinitializeForm(1);
|
||||
|
||||
// Trigger autocomplete popup
|
||||
let shownPromise = promiseACShown();
|
||||
synthesizeKey("KEY_ArrowDown"); // open
|
||||
let results = await shownPromise;
|
||||
|
||||
let popupState = await getPopupState();
|
||||
is(popupState.selectedIndex, -1, "Check no entries are selected upon opening");
|
||||
|
||||
let expectedMenuItems = ["No username (" + DATE_NOW_STRING + ")",
|
||||
"tempuser1",
|
||||
"testuser2",
|
||||
"testuser3",
|
||||
"zzzuser4"];
|
||||
checkAutoCompleteResults(results, expectedMenuItems, "mochi.test", "Check all menuitems are displayed correctly.");
|
||||
|
||||
synthesizeKey("KEY_ArrowDown"); // select first item
|
||||
checkACFormPasswordField(""); // value shouldn't update just by selecting
|
||||
synthesizeKey("KEY_Enter");
|
||||
await spinEventLoop(); // let focus happen
|
||||
checkACFormPasswordField("user0pass");
|
||||
add_task(async function insecureAutoFill_EnterOnLogin() {
|
||||
await userOpenAutocompleteOnForm1(true);
|
||||
await userPressedDown_passwordIs(""); // select insecure warning
|
||||
await userPressedDown_passwordIs(""); // select login
|
||||
await userPressedEnter_passwordIs("user0pass");
|
||||
});
|
||||
|
||||
add_task(async function test_form1_enabledInsecureFieldWarning_disabledInsecureAutoFillForm() {
|
||||
await SpecialPowers.pushPrefEnv({"set": [
|
||||
["security.insecure_field_warning.contextual.enabled", true],
|
||||
["signon.autofillForms.http", false],
|
||||
]});
|
||||
await reinitializeForm(1);
|
||||
|
||||
// Trigger autocomplete popup
|
||||
let shownPromise = promiseACShown();
|
||||
synthesizeKey("KEY_ArrowDown"); // open
|
||||
let results = await shownPromise;
|
||||
|
||||
let popupState = await getPopupState();
|
||||
is(popupState.selectedIndex, -1, "Check no entries are selected upon opening");
|
||||
|
||||
let expectedMenuItems = ["This connection is not secure. Logins entered here could be compromised. Learn More",
|
||||
"No username (" + DATE_NOW_STRING + ")",
|
||||
"tempuser1",
|
||||
"testuser2",
|
||||
"testuser3",
|
||||
"zzzuser4"];
|
||||
checkAutoCompleteResults(results, expectedMenuItems, "mochi.test", "Check all menuitems are displayed correctly.");
|
||||
|
||||
synthesizeKey("KEY_ArrowDown"); // select insecure warning
|
||||
checkACFormPasswordField(""); // value shouldn't update just by selecting
|
||||
synthesizeKey("KEY_Enter");
|
||||
await spinEventLoop(); // let focus happen
|
||||
checkACFormPasswordField("");
|
||||
add_task(async function noInsecureAutoFill_EnterOnWarning() {
|
||||
await userOpenAutocompleteOnForm1(false);
|
||||
await userPressedDown_passwordIs(""); // select insecure warning
|
||||
await userPressedEnter_passwordIs("");
|
||||
});
|
||||
|
||||
add_task(async function test_form1_disabledInsecureFieldWarning_disabledInsecureAutoFillForm() {
|
||||
await SpecialPowers.pushPrefEnv({"set": [
|
||||
["security.insecure_field_warning.contextual.enabled", false],
|
||||
["signon.autofillForms.http", false],
|
||||
]});
|
||||
await reinitializeForm(1);
|
||||
|
||||
// Trigger autocomplete popup
|
||||
synthesizeKey("KEY_ArrowDown"); // open
|
||||
let popupState = await getPopupState();
|
||||
is(popupState.open, false, "Check popup is closed with no AutoFillForms.");
|
||||
add_task(async function noInsecureAutoFill_EnterOnLogin() {
|
||||
await userOpenAutocompleteOnForm1(false);
|
||||
await userPressedDown_passwordIs(""); // select insecure warning
|
||||
await userPressedDown_passwordIs(""); // select login
|
||||
await userPressedEnter_passwordIs("user0pass");
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче