From 984169280b6aa8d27bd06dafc7b7224159f1c6c6 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Thu, 7 Dec 2017 01:37:50 +0100 Subject: Remove referrers when opening a link in a new private window. --- browser/base/content/utilityOverlay.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/browser/base/content/utilityOverlay.js b/browser/base/content/utilityOverlay.js index 7da54e064..833369f4d 100644 --- a/browser/base/content/utilityOverlay.js +++ b/browser/base/content/utilityOverlay.js @@ -258,6 +258,12 @@ function openLinkIn(url, where, params) { } if (!w || where == "window") { + // Strip referrer data when opening a new private window, to prevent + // regular browsing data from leaking into it. + if (aIsPrivate) { + aNoReferrer = true; + } + // This propagates to window.arguments. var sa = Cc["@mozilla.org/array;1"]. createInstance(Ci.nsIMutableArray); -- cgit v1.2.3