From e6e22e652391ca01634a42490080361c1de7f322 Mon Sep 17 00:00:00 2001 From: Thomas Groman Date: Mon, 16 Dec 2019 21:30:30 -0800 Subject: remove HPKP from UI as it's being deprecated in UXP --- components/nsBrowserGlue.js | 7 ++++++- components/preferences/security.js | 12 ------------ components/preferences/security.xul | 5 +---- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/components/nsBrowserGlue.js b/components/nsBrowserGlue.js index 01a1338..b978eac 100644 --- a/components/nsBrowserGlue.js +++ b/components/nsBrowserGlue.js @@ -1198,7 +1198,7 @@ BrowserGlue.prototype = { }, _migrateUI: function BG__migrateUI() { - const UI_VERSION = 19; + const UI_VERSION = 20; const BROWSER_DOCURL = "chrome://browser/content/browser.xul#"; let currentUIVersion = 0; try { @@ -1433,6 +1433,11 @@ BrowserGlue.prototype = { } #endif + if (currentUIVersion < 20) { + // HPKP change of UI preference; reset enforcement level + Services.prefs.clearUserPerf("security.cert_pinning.eforcement_level"); + } + // Update the migration version. Services.prefs.setIntPref("browser.migration.version", UI_VERSION); }, diff --git a/components/preferences/security.js b/components/preferences/security.js index 9d5f302..a0f283d 100644 --- a/components/preferences/security.js +++ b/components/preferences/security.js @@ -18,7 +18,6 @@ var gSecurityPane = { { this._pane = document.getElementById("paneSecurity"); this._initMasterPasswordUI(); - this._initHPKPUI(); }, // ADD-ONS @@ -234,17 +233,6 @@ var gSecurityPane = { "chrome://passwordmgr/content/passwordManager.xul", "", null); }, - - _initHPKPUI: function() { - let checkbox = document.getElementById("enableHPKP"); - let HPKPpref = document.getElementById("security.cert_pinning.enforcement_level"); - - if (HPKPpref.value == 0) { - checkbox.checked = false; - } else { - checkbox.checked = true; - } - }, /** * Updates the HPKP enforcement level to the proper value depending on checkbox diff --git a/components/preferences/security.xul b/components/preferences/security.xul index bc16252..bae6cca 100644 --- a/components/preferences/security.xul +++ b/components/preferences/security.xul @@ -46,9 +46,6 @@ - @@ -150,7 +147,7 @@ + preference="security.cert_pinning.hpkp.enabled"/> -- cgit v1.2.3