Can't use local files as surrogate scripts

Bug reports and enhancement requests
Post Reply
barbaz
Senior Member
Posts: 11066
Joined: Sat Aug 03, 2013 5:45 pm

Can't use local files as surrogate scripts

Post by barbaz »

From http://forums.informaction.com/viewtopi ... 973#p50973:
Giorgio Maone wrote:Rather than putting the code in the noscript.surrogate.xyz.replacement preference, put there a file:/// URL pointing at your local external script.
But that doesn't seem to work. Testcase:
NS 2.6.8.8rc1
create the following prefs:

Code: Select all

noscript.surrogate.foo.sources : @noscript.net
noscript.surrogate.foo.replacement : file:///full/path/to/Dummy.js
Dummy.js:

Code: Select all

alert("Cuckoo from local file");
No alert on noscript.net when scripts are allowed. Nothing related in the error console. Putting the code directly in the noscript.surrogate.foo.replacement preference was enough to make it work. Is this a bug, or am I doing something wrong?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Can't use local files as surrogate scripts

Post by Giorgio Maone »

Investigating, thank you.
I've already found a bug, but even fixing it I'm gets lots of "file access denied" errors. Looking into them.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
barbaz
Senior Member
Posts: 11066
Joined: Sat Aug 03, 2013 5:45 pm

Re: Can't use local files as surrogate scripts

Post by barbaz »

Fixed in 2.6.8.15rc6, thanks
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:30.0) Gecko/20100101 Firefox/30.0 SeaMonkey/2.27a1
Post Reply