I think I found a bug. When I set noscript.untrusted to a second-level domain of the form foo.bar and then vist URLs of the form http://foo.bar or http://www.foo.bar ("blacklist mode"), javascript is ignored as expected. But when I restart the browser and then vist those URLs, javascript is unexpectedly executed. In fact, the only noscript.untrusted entries that work the same after a browser restart as they do after setting are those that fully specify resource type and lower-level domains. I found this a couple of years ago in FF2, but until today hadn't tested all the permuations and chalked it up as a "feature".
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.14) Gecko/2009082706 Firefox/3.0.14 NS/1.9.8.86
P.S. What URL formats, delimiters, and wildcards are required/optional/unused/illegal in the noscript.untrusted string?
bug: noscript.untrusted
bug: noscript.untrusted
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.14) Gecko/2009082706 Firefox/3.0.14
- Giorgio Maone
- Site Admin
- Posts: 9526
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: bug: noscript.untrusted
Do you edit the preference manually from about:config?
Does it change after browser restart?
Does it change after browser restart?
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Re: bug: noscript.untrusted
Yes.Do you edit the preference manually from about:config?
No, the string does not change.Does it change after browser restart?
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.14) Gecko/2009082706 Firefox/3.0.14
- Giorgio Maone
- Site Admin
- Posts: 9526
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: bug: noscript.untrusted
Then the strange thing is that it work before restart.kwiniec wrote:Yes.Do you edit the preference manually from about:config?
Because of legacy issues with Mozilla code, a 2nd level domain entry matches its subdomains but not itself, unless the version including scheme is explicitly put in the list.
Using the UI to allow/mark as untrusted hides this implementation details.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Re: bug: noscript.untrusted
Indeed. In fact, upon retesting, I see the status bar icon does not indicate javascript is being blocked even though it is.Then the strange thing is that it work before restart.
I now see this part working as described -- manually entering foo.bar does indeed block http://www.foo.bar after restart. I must have been hallucinating earlier.Because of legacy issues with Mozilla code, a 2nd level domain entry matches its subdomains but not itself, unless the version including scheme is explicitly put in the list.
I also see now that using the UI to block foo.bar (which I never tried before) explicitly adds foo.bar, http://foo.bar, and https://foo.bar to the noscript.untrusted string. And with foo.bar matching http://www.foo.bar (and presumably https://www.foo.bar), all the bases are covered. So the only bug is the first one above, and its primary effect is only to prevent anyone figuring out how it works. Which I guess is of arguable importance.Using the UI to allow/mark as untrusted hides this implementation details.
And so I would like to change this to a low-priority enhancement request: please consider someday adding something akin to a "noscript.mozlegacycompat" boolean which defaults to "true" and which when set to "false" allows foo.bar to match itself. This would make managing the untrusted list a lot faster and less error-prone.
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.14) Gecko/2009082706 Firefox/3.0.14