summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2017-12-07 01:37:50 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-08 21:19:50 +0100
commit984169280b6aa8d27bd06dafc7b7224159f1c6c6 (patch)
tree3699be73e33b4a8d417831ad143acd8e569931f3
parent048d6e18879d432bffdfd8eb5c98f66ffa6ea6da (diff)
downloadUXP-984169280b6aa8d27bd06dafc7b7224159f1c6c6.tar
UXP-984169280b6aa8d27bd06dafc7b7224159f1c6c6.tar.gz
UXP-984169280b6aa8d27bd06dafc7b7224159f1c6c6.tar.lz
UXP-984169280b6aa8d27bd06dafc7b7224159f1c6c6.tar.xz
UXP-984169280b6aa8d27bd06dafc7b7224159f1c6c6.zip
Remove referrers when opening a link in a new private window.
-rw-r--r--browser/base/content/utilityOverlay.js6
1 files changed, 6 insertions, 0 deletions
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);