what browser prefs are involved?

Bug reports and enhancement requests
Post Reply
Nine
Posts: 4
Joined: Thu Jul 30, 2015 2:18 pm

what browser prefs are involved?

Post by Nine »

Hi, I'm assuming that NoScript works this way: Firefox has the builtin ability to block connections to a list of URLs. NoScript provides the front end to manipulate that list.

If true, what are the Firefox prefs used? Thanks. (I just want to understand how it all works.)
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.6) Gecko/20150723 Firefox/31.9 PaleMoon/25.6.0
User avatar
therube
Ambassador
Posts: 7972
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: what browser prefs are involved?

Post by therube »

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 5.1; rv:36.0) Gecko/20100101 SeaMonkey/2.33.1
Nine
Posts: 4
Joined: Thu Jul 30, 2015 2:18 pm

Re: what browser prefs are involved?

Post by Nine »

Thanks, but that link only goes to the home page, which does not contain the answer nor have any links which seem to go to the answer (including the faq, which I'd already looked through). The site is all about how to use it, not about how it works.
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.6) Gecko/20150723 Firefox/31.9 PaleMoon/25.6.0
barbaz
Senior Member
Posts: 11109
Joined: Sat Aug 03, 2013 5:45 pm

Re: what browser prefs are involved?

Post by barbaz »

Its not pref controlled, it's all done by code hooking/implementing internal Gecko interfaces.

If you're really curious, you can disassemble NoScript as follows:
1) Download the xpi (right-click > Save Link As)
2) Change the .xpi to .zip
3) unzip it
4) There is an inner .jar file. Also change that extension to .zip and unzip that.

If you need help understanding the code, https://developer.mozilla.org/ is a really good resource.

Hope that helps.
*Always* check the changelogs BEFORE updating that important software!
-
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: what browser prefs are involved?

Post by Thrawn »

It used to be controllable by CAPS, which was indeed based on preferences. Although manually controlling them would be a whole lot of work.

CAPS is dead now; there's no preference-based system.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0
Nine
Posts: 4
Joined: Thu Jul 30, 2015 2:18 pm

Re: what browser prefs are involved?

Post by Nine »

Thanks for both replies. So then it's done using XPCOM and XUL. Way more involved than I'd figured. (btw, saw FlashIdiocy.js :)

But if NoScript hooks into Gecko, then it should be possible to also prevent inline scripts by rewriting the main source HTML, right? Yet I think I'd read somewhere that NoScript can't (or at least 'doesn't') do that.
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.6) Gecko/20150723 Firefox/31.9 PaleMoon/25.6.0
barbaz
Senior Member
Posts: 11109
Joined: Sat Aug 03, 2013 5:45 pm

Re: what browser prefs are involved?

Post by barbaz »

Nine wrote:it should be possible to also prevent inline scripts by rewriting the main source HTML, right? Yet I think I'd read somewhere that NoScript can't (or at least 'doesn't') do that.
It doesn't, why would it need to do that? I mean, it can, but that's way too complicated compared to the current approach.
*Always* check the changelogs BEFORE updating that important software!
-
Nine
Posts: 4
Joined: Thu Jul 30, 2015 2:18 pm

Re: what browser prefs are involved?

Post by Nine »

Why? I use NoScript for privacy as well as for security (and also to cut down on page-loading times -- which makes a big difference, e.g., on newspaper sites).

By preventing javascript, you prevent browser fingerprinting.

[edit: Come to think of it, that would seem to provide better security, too.]
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.6) Gecko/20150723 Firefox/31.9 PaleMoon/25.6.0
barbaz
Senior Member
Posts: 11109
Joined: Sat Aug 03, 2013 5:45 pm

Re: what browser prefs are involved?

Post by barbaz »

???
Of course NoScript blocks in line scripts, if it didn't then it wouldn't be a security tool now would it? ;)

I meant it doesn't block them by removing them from the DOM, it uses internal Gecko APIs to instruct Gecko not to run JS on the site, that is a much simpler approach than yanking out the <script> elements as they come (and leaving the <script> elements alone makes it easier to examine a page's source anyway).
*Always* check the changelogs BEFORE updating that important software!
-
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: what browser prefs are involved?

Post by Thrawn »

barbaz wrote:that is a much simpler approach than yanking out the <script> elements as they come
And much more reliable, too. Browsers are very forgiving when they parse a page, as Giorgio (who maintains an XSS filter) is well aware.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0
Post Reply