mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-01 21:07:30 +09:00
Issue #1289 - Part 4: Update Pale Moon UI.
This swaps the UI choice to using the new boolean pref instead of enforcement level.
This commit is contained in:
parent
08a2dbad4c
commit
4749ba0047
3 changed files with 10 additions and 32 deletions
|
|
@ -1198,7 +1198,7 @@ BrowserGlue.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_migrateUI: function BG__migrateUI() {
|
_migrateUI: function BG__migrateUI() {
|
||||||
const UI_VERSION = 19;
|
const UI_VERSION = 20;
|
||||||
const BROWSER_DOCURL = "chrome://browser/content/browser.xul#";
|
const BROWSER_DOCURL = "chrome://browser/content/browser.xul#";
|
||||||
let currentUIVersion = 0;
|
let currentUIVersion = 0;
|
||||||
try {
|
try {
|
||||||
|
|
@ -1433,6 +1433,11 @@ BrowserGlue.prototype = {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (currentUIVersion < 20) {
|
||||||
|
// HPKP change of UI preference; reset enforcement level
|
||||||
|
Services.prefs.clearUserPref("security.cert_pinning.enforcement_level");
|
||||||
|
}
|
||||||
|
|
||||||
// Update the migration version.
|
// Update the migration version.
|
||||||
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
|
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ var gSecurityPane = {
|
||||||
{
|
{
|
||||||
this._pane = document.getElementById("paneSecurity");
|
this._pane = document.getElementById("paneSecurity");
|
||||||
this._initMasterPasswordUI();
|
this._initMasterPasswordUI();
|
||||||
this._initHPKPUI();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// ADD-ONS
|
// ADD-ONS
|
||||||
|
|
@ -233,31 +232,5 @@ var gSecurityPane = {
|
||||||
document.documentElement.openWindow("Toolkit:PasswordManager",
|
document.documentElement.openWindow("Toolkit:PasswordManager",
|
||||||
"chrome://passwordmgr/content/passwordManager.xul",
|
"chrome://passwordmgr/content/passwordManager.xul",
|
||||||
"", null);
|
"", 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
|
|
||||||
* state.
|
|
||||||
*/
|
|
||||||
updateHPKPPref: function() {
|
|
||||||
let checkbox = document.getElementById("enableHPKP");
|
|
||||||
let HPKPpref = document.getElementById("security.cert_pinning.enforcement_level");
|
|
||||||
|
|
||||||
if (checkbox.checked) {
|
|
||||||
HPKPpref.value = 2;
|
|
||||||
} else {
|
|
||||||
HPKPpref.value = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -46,9 +46,9 @@
|
||||||
<preference id="network.stricttransportsecurity.enabled"
|
<preference id="network.stricttransportsecurity.enabled"
|
||||||
name="network.stricttransportsecurity.enabled"
|
name="network.stricttransportsecurity.enabled"
|
||||||
type="bool"/>
|
type="bool"/>
|
||||||
<preference id="security.cert_pinning.enforcement_level"
|
<preference id="security.cert_pinning.hpkp.enabled"
|
||||||
name="security.cert_pinning.enforcement_level"
|
name="security.cert_pinning.hpkp.enabled"
|
||||||
type="int"/>
|
type="bool"/>
|
||||||
|
|
||||||
<!-- Opportunistic Encryption -->
|
<!-- Opportunistic Encryption -->
|
||||||
|
|
||||||
|
|
@ -150,7 +150,7 @@
|
||||||
<checkbox id="enableHPKP"
|
<checkbox id="enableHPKP"
|
||||||
label="&enableHPKP.label;"
|
label="&enableHPKP.label;"
|
||||||
accesskey="&enableHPKP.accesskey;"
|
accesskey="&enableHPKP.accesskey;"
|
||||||
oncommand="gSecurityPane.updateHPKPPref();"/>
|
preference="security.cert_pinning.hpkp.enabled"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue