Bug 1540637: Don't save persistent certificate exceptions in private browsing windows. r=johannh
authorSyeda Asra Arshia Qadri <asra.qadri@gmail.com>
Tue, 09 Apr 2019 10:30:01 +0000
changeset 468555 87ac760ffe88db9466ec82b7e720c7a07b449a3f
parent 468554 a9fe791a62ccf90854d90074e7150dead7874b12
child 468556 8e92ef0be5a1ad8c15beb01328780078760ecf19
child 468563 468689f35a67bf324c486999775bb58f7c78ea1f
push id112733
push usercsabou@mozilla.com
push dateTue, 09 Apr 2019 16:30:22 +0000
treeherdermozilla-inbound@e14dba56bbfd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh
bugs1540637
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1540637: Don't save persistent certificate exceptions in private browsing windows. r=johannh 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
@@ -3188,18 +3188,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();
         break;