summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-06-17 09:29:53 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-06-17 09:29:53 +0200
commit1f6068bc695b8bee56f0a99e4343ff138b1ee188 (patch)
tree4b78cacb88e4fe29027fc0c25fda4aea1be56e0e
parent5a50a171b9855e5ac3fafe50547a381aef04a37b (diff)
downloadUXP-1f6068bc695b8bee56f0a99e4343ff138b1ee188.tar
UXP-1f6068bc695b8bee56f0a99e4343ff138b1ee188.tar.gz
UXP-1f6068bc695b8bee56f0a99e4343ff138b1ee188.tar.lz
UXP-1f6068bc695b8bee56f0a99e4343ff138b1ee188.tar.xz
UXP-1f6068bc695b8bee56f0a99e4343ff138b1ee188.zip
Bug 1398229 - Save-link-as feature should use the loading principal - context menu using nsIContentPolicy.TYPE_SAVE_AS_DOWNLOAD
-rw-r--r--application/basilisk/base/content/nsContextMenu.js4
-rw-r--r--application/palemoon/base/content/nsContextMenu.js4
2 files changed, 6 insertions, 2 deletions
diff --git a/application/basilisk/base/content/nsContextMenu.js b/application/basilisk/base/content/nsContextMenu.js
index 097caf367..31fa4e761 100644
--- a/application/basilisk/base/content/nsContextMenu.js
+++ b/application/basilisk/base/content/nsContextMenu.js
@@ -1355,7 +1355,9 @@ nsContextMenu.prototype = {
// checks after redirects, see bug: 1136055
var channel = NetUtil.newChannel({
uri: makeURI(linkURL),
- loadUsingSystemPrincipal: true
+ loadingPrincipal: this.principal,
+ contentPolicyType: Ci.nsIContentPolicy.TYPE_SAVEAS_DOWNLOAD,
+ securityFlags: Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS,
});
if (linkDownload)
diff --git a/application/palemoon/base/content/nsContextMenu.js b/application/palemoon/base/content/nsContextMenu.js
index f389491d3..bd8bf9c85 100644
--- a/application/palemoon/base/content/nsContextMenu.js
+++ b/application/palemoon/base/content/nsContextMenu.js
@@ -1131,7 +1131,9 @@ nsContextMenu.prototype = {
// checks after redirects, see bug: 1136055
var channel = NetUtil.newChannel({
uri: makeURI(linkURL),
- loadUsingSystemPrincipal: true
+ loadingPrincipal: this.principal,
+ contentPolicyType: Ci.nsIContentPolicy.TYPE_SAVEAS_DOWNLOAD,
+ securityFlags: Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS,
});
if (linkDownload)