Page 1 of 1

js url from about:blank allows scripts globally

Posted: Sun Aug 19, 2012 4:52 pm
by al_9x
Fx 15.0b5, NS 2.5.2rc1, new profile, allowURLBarJS=true
  1. start Fx, open error console
  2. load about:blank
  3. load javascript:'test'
  4. the url executes, but the following is logged

    Code: Select all

    Error: can't access dead object
    Source File: jar:file:///ns_xpi_path/components/noscriptService.js
    Line: 4333
    
  5. check the ns icon and options, scripts are now globally allowed, which survives a restart
from about:newtab the js url doesn't load at all

Re: js url from about:blank allows scripts globally

Posted: Sun Aug 19, 2012 6:57 pm
by therube
I can generate the Error Console message.

I could not generate the Globally Allowed.

Though there is definitely something screwy going on.
Like if I manually enabled Allow Scripts Globally, not sure what it did or did not do?
I don't think Allow Globally is working at that point?

Firefox Setup 15.0b5.exe
http://hg.mozilla.org/releases/mozilla-beta/rev/5b309ad1a88a

(What a frickin joke what they use for their UA!)

Re: js url from about:blank allows scripts globally

Posted: Sun Aug 19, 2012 7:08 pm
by therube
I see similar in SeaMonkey, Aurora, Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20120817 Firefox/16.0 SeaMonkey/2.13a2.

Re: js url from about:blank allows scripts globally

Posted: Wed Aug 22, 2012 10:03 pm
by GµårÐïåñ
Yeah I get the error too but not the globally allowed, so not sure how you got that to happen. Have you tried a more recent nightly to make sure its not something Mozilla screwed up between builds? It just recently happened with something else where the nightly broke something on Mozilla side and affected NS but was fine the next day.

Re: js url from about:blank allows scripts globally

Posted: Thu Aug 23, 2012 10:40 pm
by Giorgio Maone
Fixed in latest development build 2.5.3rc2, thank you.

Re: js url from about:blank allows scripts globally

Posted: Thu Aug 23, 2012 11:32 pm
by al_9x
Giorgio Maone wrote:Fixed in latest development build 2.5.3rc2, thank you.
404 on noscript.net, got it from AMO

a couple of related issues:
  1. if starting with about:blank and the first javascript: url is non void, subsequent invocations (void and not) don't run.
    after javascript:'test' loads, invoke javascript:'test1' or javascript:alert('test')
    when starting with a different url (e.g. about:home), not a problem
  2. javascript: urls don't work at all from about:newtab

Re: js url from about:blank allows scripts globally

Posted: Mon Sep 03, 2012 8:56 am
by Giorgio Maone
al_9x wrote:
  1. if starting with about:blank and the first javascript: url is non void, subsequent invocations (void and not) don't run.
    after javascript:'test' loads, invoke javascript:'test1' or javascript:alert('test')
    when starting with a different url (e.g. about:home), not a problem
  2. javascript: urls don't work at all from about:newtab
It looks like a byproduct of the principals which get assigned to about:newtab and the result of a JavaScript expression from about:blank.
I'm not sure I can do anything about it, but I'll try.