Can ABE do redirects to file:///

Discussions about the Application Boundaries Enforcer (ABE) module
Guest

Can ABE do redirects to file:///

Post by Guest »

If yes, can someone please show me a example? I want example.com/test.js redirect to file:///test.js. Thanks in advance.
Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: Can ABE do redirects to file:///

Post by barbaz »

Can't be done only using ABE, but NoScript can do it, you need also use surrogate script for that.

ABE:

Code: Select all

Site .example.com/test.js
Deny INC
surrogates setup:
about:config
right-click > new > string
name:

Code: Select all

noscript.surrogate.foofoofoo.replacement
value:

Code: Select all

file:///test.js
right-click > new > string
name:

Code: Select all

noscript.surrogate.foofoofoo.sources
value:

Code: Select all

.example.com/test.js
You can replace "foofoofoo" with anything as long as it's the same in the two pref names.
*Always* check the changelogs BEFORE updating that important software!
-
Guest

Re: Can ABE do redirects to file:///

Post by Guest »

Thanks for your quick reply - indeed very quick. I will give your example a try and report later. :)
Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: Can ABE do redirects to file:///

Post by barbaz »

You're welcome! Image
*Always* check the changelogs BEFORE updating that important software!
-
Guest

Re: Can ABE do redirects to file:///

Post by Guest »

Is it really true, i can`t use the user.js like this:

Code: Select all

user_pref("noscript.surrogate.foofoofoo.replacement", "file:///test.js");
user_pref("noscript.surrogate.foofoofoo.sources", ".example.com/test.js");
to make firefox aware of those line?

The developer really wants me to type in those lines in "about:config" ?
And next time i update my browser (reinstall from the tarball) i have to type it again in ... ? :)
Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: Can ABE do redirects to file:///

Post by barbaz »

Guest wrote:Is it really true, i can`t use the user.js like this:

Code: Select all

user_pref("noscript.surrogate.foofoofoo.replacement", "file:///test.js");
user_pref("noscript.surrogate.foofoofoo.sources", ".example.com/test.js");
to make firefox aware of those line?

The developer really wants me to type in those lines in "about:config" ?
No this is not true. You should be able to add those lines to user.js and restart Firefox and have it work. The fact it's not working means you've likely got a corrupt prefs.js or user.js
Guest wrote:And next time i update my browser (reinstall from the tarball) i have to type it again in ... ? :)
Your profile resides outside the install location. Not sure what you're trying to ask here.
*Always* check the changelogs BEFORE updating that important software!
-
Guest

Re: Can ABE do redirects to file:///

Post by Guest »

Ok, my fault, was a typo! :roll:
Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Guest

Re: Can ABE do redirects to file:///

Post by Guest »

If a surrogate get' s successful executed, this doen' t show up in firefox's browser console or somewhere else?
Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: Can ABE do redirects to file:///

Post by barbaz »

No, but it's easy to make it, just stick a console.log call (or the like) on the end of the surrogate in question if you'd like to have that information.
*Always* check the changelogs BEFORE updating that important software!
-
Post Reply