Page 1 of 1
JavaScript URL fails when NoScript is enabled
Posted: Fri Jan 30, 2015 2:17 am
by therube
JavaScript URL fails when NoScript is enabled
in SeaMonkey.
Not all, but this one fails:
Code: Select all
javascript: var p=r(); function r(){var g=0;var x=false;var x=z(document.forms);g=g+1;var w=window.frames;for(var k=0;k<w.length;k++) {var x = ((x) || (z(w[k].document.forms)));g=g+1;}if (!x) alert('Password not found in ' + g + ' forms');}function z(f){var b=false;for(var i=0;i<f.length;i++) {var e=f[i].elements;for(var j=0;j<e.length;j++) {if (h(e[j])) {b=true}}}return b;}function h(ej){var s='';if (ej.type=='password'){s=ej.value;if (s!=''){prompt('Password found ', s)}else{alert('Password is blank')}return true;}}
While this one works:
noscript.allowURLBarJS;true for the times NoScript is enabled.
Not seeing anything in Error Console.
?
Re: JavaScript URL fails when NoScript is enabled
Posted: Fri Jan 30, 2015 2:54 am
by barbaz
What is the failing bookmarklet supposed to do, and on what page are you trying it, and what is the script permission status of that page?
Are you typing/pasting it in the URL bar or invoking it as a bookmarklet?
(If I can reproduce maybe something would show up in the Web Console logs - sometimes with NoScript, bookmarklet errors end up there instead of somewhere the Error Console would get it. Sucks that SeaMonkey doesn't have the Browser Console.

)
Re: JavaScript URL fails when NoScript is enabled
Posted: Fri Jan 30, 2015 2:59 am
by therube
It should popup an alert showing any passwords obscured by **** from a un/pw box.
URL is immaterial, you can try it on any page & if there is nothing to be found you still should get a popup dialog box.
I am typing/pasting it in the URL bar .
Re: JavaScript URL fails when NoScript is enabled
Posted: Fri Jan 30, 2015 3:04 am
by therube
Oops, I see FF
is likewise affected.
(I didn't have NoScript installed in FF

.)
Re: JavaScript URL fails when NoScript is enabled
Posted: Fri Jan 30, 2015 3:15 am
by therube
Looks to be related:
Error: Permission denied to access property 'document'
possibly, this?
"ReferenceError: r is not defined"
It might work sometimes?
Maybe after Allow Globally, but not just an Allow?
And then it might work even after a Forbid Globally, but then will not after (an actual) page refresh (or something along those lines)?
In order for the bookmarklet to work, the domain has to be Allowed.
Re: JavaScript URL fails when NoScript is enabled
Posted: Fri Jan 30, 2015 3:42 am
by barbaz
Code: Select all
[xx:43:25.985] ReferenceError: r is not defined @ chrome://noscript/content/JSURL.js:83
Likely a Gecko 35 issue and not a NoScript issue?
Let's see if moving things around gets it working...
Re: JavaScript URL fails when NoScript is enabled
Posted: Fri Jan 30, 2015 3:46 am
by barbaz
OK try this instead
Code: Select all
javascript: function r(){var g=0;var x=false;var x=z(document.forms);g=g+1;var w=window.frames;for(var k=0;k<w.length;k++) {var x = ((x) || (z(w[k].document.forms)));g=g+1;}if (!x) alert('Password not found in ' + g + ' forms');}function z(f){var b=false;for(var i=0;i<f.length;i++) {var e=f[i].elements;for(var j=0;j<e.length;j++) {if (h(e[j])) {b=true}}}return b;}function h(ej){var s='';if (ej.type=='password'){s=ej.value;if (s!=''){prompt('Password found ', s)}else{alert('Password is blank')}return true;}};r();void(0)