Can ABE do redirects to file:///

Discussions about the Application Boundaries Enforcer (ABE) module
Guest

Can ABE do redirects to file:///

Post by Guest » Wed Jul 27, 2016 4:08 pm

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: 9781
Joined: Sat Aug 03, 2013 5:45 pm

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

Post by barbaz » Wed Jul 27, 2016 4:14 pm

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 » Wed Jul 27, 2016 4:18 pm

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: 9781
Joined: Sat Aug 03, 2013 5:45 pm

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

Post by barbaz » Wed Jul 27, 2016 4:19 pm

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

Guest

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

Post by Guest » Fri Jul 29, 2016 3:42 pm

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: 9781
Joined: Sat Aug 03, 2013 5:45 pm

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

Post by barbaz » Fri Jul 29, 2016 4:16 pm

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 » Sat Jul 30, 2016 11:11 am

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 » Thu Aug 04, 2016 12:43 pm

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: 9781
Joined: Sat Aug 03, 2013 5:45 pm

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

Post by barbaz » Thu Aug 04, 2016 4:31 pm

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