From 7a55731da0b31f625f58dfc562c7e059308d93db Mon Sep 17 00:00:00 2001 From: Edwyn Zhou Date: Wed, 6 Nov 2024 21:31:18 +0000 Subject: [PATCH] Bug 1926989 - Fixed typo in pref dom.security.https_first_add_exception_on_failiure. r=valentin,necko-reviewers Differential Revision: https://phabricator.services.mozilla.com/D228219 --- dom/security/nsHTTPSOnlyUtils.cpp | 2 +- dom/security/test/https-first/test_referrer_policy.html | 2 +- modules/libpref/init/StaticPrefList.yaml | 2 +- netwerk/protocol/http/HttpBaseChannel.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dom/security/nsHTTPSOnlyUtils.cpp b/dom/security/nsHTTPSOnlyUtils.cpp index c4e24566f895..89cac711089c 100644 --- a/dom/security/nsHTTPSOnlyUtils.cpp +++ b/dom/security/nsHTTPSOnlyUtils.cpp @@ -556,7 +556,7 @@ nsHTTPSOnlyUtils::PotentiallyDowngradeHttpsFirstRequest( uri, true); if (mozilla::StaticPrefs:: - dom_security_https_first_add_exception_on_failiure()) { + dom_security_https_first_add_exception_on_failure()) { AddHTTPSFirstException(uri, loadInfo); } diff --git a/dom/security/test/https-first/test_referrer_policy.html b/dom/security/test/https-first/test_referrer_policy.html index 395d5179480c..7cb6268dc10d 100644 --- a/dom/security/test/https-first/test_referrer_policy.html +++ b/dom/security/test/https-first/test_referrer_policy.html @@ -229,7 +229,7 @@ async function runTest() { SpecialPowers.pushPrefEnv({ set: [ ["dom.security.https_first", true], - ["dom.security.https_first_add_exception_on_failiure", false], + ["dom.security.https_first_add_exception_on_failure", false], ["network.http.referer.disallowCrossSiteRelaxingDefault", false], ]}, runTest); diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index c6efa6c4f093..742efcff3f80 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -4077,7 +4077,7 @@ # If true, will add a special temporary HTTPS-First exception for a site when a # HTTPS-First upgrade fails. -- name: dom.security.https_first_add_exception_on_failiure +- name: dom.security.https_first_add_exception_on_failure type: RelaxedAtomicBool value: true mirror: always diff --git a/netwerk/protocol/http/HttpBaseChannel.cpp b/netwerk/protocol/http/HttpBaseChannel.cpp index 23d2013e87bc..8aa3d7fbbc0d 100644 --- a/netwerk/protocol/http/HttpBaseChannel.cpp +++ b/netwerk/protocol/http/HttpBaseChannel.cpp @@ -6180,7 +6180,7 @@ nsresult HttpBaseChannel::CheckRedirectLimit(nsIURI* aNewURI, // upgrade behavior if we have upgrade-downgrade loop to break the loop and // load the http request next if (mozilla::StaticPrefs:: - dom_security_https_first_add_exception_on_failiure() && + dom_security_https_first_add_exception_on_failure() && nsHTTPSOnlyUtils::IsUpgradeDowngradeEndlessLoop( mURI, aNewURI, mLoadInfo, {nsHTTPSOnlyUtils::UpgradeDowngradeEndlessLoopOptions::