summaryrefslogtreecommitdiffstats
path: root/application/palemoon/components/feeds/FeedWriter.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-11-28 23:10:30 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-11-28 23:10:30 +0100
commit088c3cf890cc2d96f2093e2116612cbf65bfaeea (patch)
treeb4d3c68155f2de43432dd00c167d3029732be146 /application/palemoon/components/feeds/FeedWriter.js
parentec3829bf7266ebec111f41268c6c491356576df1 (diff)
parentfe11e14d3cfc2900facf152257acda87280b6cdc (diff)
downloadUXP-088c3cf890cc2d96f2093e2116612cbf65bfaeea.tar
UXP-088c3cf890cc2d96f2093e2116612cbf65bfaeea.tar.gz
UXP-088c3cf890cc2d96f2093e2116612cbf65bfaeea.tar.lz
UXP-088c3cf890cc2d96f2093e2116612cbf65bfaeea.tar.xz
UXP-088c3cf890cc2d96f2093e2116612cbf65bfaeea.zip
Merge branch 'master' into Sync-weave
Diffstat (limited to 'application/palemoon/components/feeds/FeedWriter.js')
-rw-r--r--application/palemoon/components/feeds/FeedWriter.js20
1 files changed, 4 insertions, 16 deletions
diff --git a/application/palemoon/components/feeds/FeedWriter.js b/application/palemoon/components/feeds/FeedWriter.js
index 2ae31dffa..d704835bb 100644
--- a/application/palemoon/components/feeds/FeedWriter.js
+++ b/application/palemoon/components/feeds/FeedWriter.js
@@ -692,21 +692,6 @@ FeedWriter.prototype = {
},
/**
- * Get moz-icon url for a file
- * @param file
- * A nsIFile object for which the moz-icon:// is returned
- * @returns moz-icon url of the given file as a string
- */
- _getFileIconURL: function FW__getFileIconURL(file) {
- var ios = Cc["@mozilla.org/network/io-service;1"].
- getService(Ci.nsIIOService);
- var fph = ios.getProtocolHandler("file")
- .QueryInterface(Ci.nsIFileProtocolHandler);
- var urlSpec = fph.getURLSpecFromFile(file);
- return "moz-icon://" + urlSpec + "?size=16";
- },
-
- /**
* Helper method to set the selected application and system default
* reader menuitems details from a file object
* @param aMenuItem
@@ -717,7 +702,10 @@ FeedWriter.prototype = {
_initMenuItemWithFile: function(aMenuItem, aFile) {
this._contentSandbox.menuitem = aMenuItem;
this._contentSandbox.label = this._getFileDisplayName(aFile);
- this._contentSandbox.image = this._getFileIconURL(aFile);
+ // For security reasons, access to moz-icon:file://... URIs is
+ // no longer allowed (indirect file system access from content).
+ // We use a dummy application instead to get a generic icon.
+ this._contentSandbox.image = "moz-icon://dummy.exe?size=16";
var codeStr = "menuitem.setAttribute('label', label); " +
"menuitem.setAttribute('image', image);"
Cu.evalInSandbox(codeStr, this._contentSandbox);