diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-06-18 13:22:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-18 13:22:25 +0200 |
commit | 34302180b38e903c7c071b501cbc8be89efd56ec (patch) | |
tree | a64bc80cbee13acad97321f90a75c7bcd8bb7a62 /application/basilisk | |
parent | 4ee1656d4a0721d31039508e0d0abc79e3f38c8d (diff) | |
parent | 22f7e8f8a74ee5ff83a0b76c789d011bd54244b9 (diff) | |
download | uxp-34302180b38e903c7c071b501cbc8be89efd56ec.tar.gz |
Merge pull request #509 from janekptacijarabaci/context-menu_save-link-as_principal_1
Added "nsIContentPolicy::TYPE_SAVEAS_DOWNLOAD": The context menu - "Save Link As" feature should use the loading principal instead of the system principal
Diffstat (limited to 'application/basilisk')
-rw-r--r-- | application/basilisk/base/content/nsContextMenu.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/application/basilisk/base/content/nsContextMenu.js b/application/basilisk/base/content/nsContextMenu.js index 097caf3670..589d670abb 100644 --- a/application/basilisk/base/content/nsContextMenu.js +++ b/application/basilisk/base/content/nsContextMenu.js @@ -1348,14 +1348,11 @@ nsContextMenu.prototype = { } // setting up a new channel for 'right click - save link as ...' - // ideally we should use: - // * doc - as the loadingNode, and/or - // * this.principal - as the loadingPrincipal - // for now lets use systemPrincipal to bypass mixedContentBlocker - // 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) |