Bug 1540637: Don't save persistent certificate exceptions in private browsing windows. r=johannh a=pascalc
authorSyeda Asra Arshia Qadri <asra.qadri@gmail.com>
Tue, 09 Apr 2019 10:30:01 +0000
changeset 526165 2dbd0c7ee453c3e2f79639c23a182c5dc8947ecb
parent 526164 5902c534b81e36cf6a7119fbe06297f55e8eb941
child 526166 730af3807039c56c000064063b76fa6d121867e1
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh, pascalc
bugs1540637
milestone67.0
Bug 1540637: Don't save persistent certificate exceptions in private browsing windows. r=johannh a=pascalc Differential Revision: https://phabricator.services.mozilla.com/D26539
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -3165,18 +3165,17 @@ var BrowserOnClick = {
           }
           if (securityInfo.isDomainMismatch) {
             flags |= overrideService.ERROR_MISMATCH;
           }
           if (securityInfo.isNotValidAtThisTime) {
             flags |= overrideService.ERROR_TIME;
           }
           let uri = Services.uriFixup.createFixupURI(location, 0);
-          let permanentOverride =
-            Services.prefs.getBoolPref("security.certerrors.permanentOverride");
+          let permanentOverride = !PrivateBrowsingUtils.isBrowserPrivate(browser) && Services.prefs.getBoolPref("security.certerrors.permanentOverride");
           cert = securityInfo.serverCert;
           overrideService.rememberValidityOverride(
             uri.asciiHost, uri.port,
             cert,
             flags,
             !permanentOverride);
           browser.reload();
           return;