[Pkg-mozext-commits] [greasemonkey] 18/30: Set originalURI for greasemonkey-script: protocol channels.

David Prévot taffit at moszumanska.debian.org
Thu Nov 26 00:56:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository greasemonkey.

commit 0c8e9c77e397f2c49c05c01948705aff2addf4fd
Author: Ich <ventero at ventero.de>
Date:   Tue Nov 10 23:47:51 2015 +0100

    Set originalURI for greasemonkey-script: protocol channels.
    
    Fixes #2326.
---
 modules/scriptProtocol.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/modules/scriptProtocol.js b/modules/scriptProtocol.js
index d6c7e78..e91b022 100644
--- a/modules/scriptProtocol.js
+++ b/modules/scriptProtocol.js
@@ -146,7 +146,14 @@ var ScriptProtocol = {
           // In parent scope we have the raw script, with file intact.
           uri = GM_util.getUriFromFile(resource.file);
         }
-        return GM_util.channelFromUri(uri);
+
+        // Get the channel for the file URI, but set its originalURI to the
+        // greasemonkey-script: protocol URI, to ensure it can still be loaded
+        // in unprivileged contexts (bug #2326).
+        var channel = GM_util.channelFromUri(uri);
+        channel.originalURI = aUri;
+
+        return channel;
       }
     }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git



More information about the Pkg-mozext-commits mailing list