Page 1 of 1

[RESOLVED] FF4+NoScript+document.domain=Permission denied

Posted: Sun Jan 23, 2011 6:00 pm
by ivank
Hi,

I noticed a problem when using Firefox 4 nightly (2011-01-22) + NoScript 2.0.9.6: sometimes setting document.domain has no effect (I believe this because the next line throws a Permission denied error). I cannot reproduce this problem with the NoScript extension disabled, or in any other browser (including FF 3.6.13). I can reproduce this with NoScript settings at their defaults.

Repro steps:
1) visit http://browsernode.com/whiteboard/?mode=http
2) whitelist "browsernode.com"; note that this page runs JavaScript from subdomains too
2) open Error Console; you should see:

Code: Select all

Error: Permission denied to access property 'href'
Source File: http://ml21162754532992419058.browsernode.com/xdrframe/?framenum=1&id=g554ahiwoq95vvmdsmvp142o
Line: 10
The error is thrown from the JavaScript in /xdrframe/ at:

Code: Select all

<script>
	document.domain = "browsernode.com";
	var parentUrlSplit = parent.location.href.split("/"); // <--------------
The strange thing is, if browsernode.com is already whitelisted when the browser starts, it works fine.

Please let me know if you don't see the bug, and I'll post more environment info.

Thanks for taking a look,

Ivan

Re: FF4 + NoScript + document.domain -> Permission denied er

Posted: Sun Feb 06, 2011 4:02 am
by ivank
Everything appears to work now in 4.0b12pre (2011-02-05). This was probably a Firefox problem fixed in https://bugzilla.mozilla.org/show_bug.cgi?id=629331