Noscript puts FF in a reload loop
- Giorgio Maone
- Site Admin
- Posts: 9454
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: Noscript puts FF in a reload loop
I've finally managed to reproduce it, only by adding about a thousand whitespaces before the
<meta http-equiv="content-type" content= "text/html; charset=us-ascii">
element.
Did you omit the whitespace when pasting or it is actually not there in your samples?
Or maybe there's something in your configuration preventing the charset declaration from being "seen" in the first 1024 bytes of the file?!
Investigating how to work-around this hairy problem anyway, thanks.
@musonius: do you mean you get reload loops as well?
<meta http-equiv="content-type" content= "text/html; charset=us-ascii">
element.
Did you omit the whitespace when pasting or it is actually not there in your samples?
Or maybe there's something in your configuration preventing the charset declaration from being "seen" in the first 1024 bytes of the file?!
Investigating how to work-around this hairy problem anyway, thanks.
@musonius: do you mean you get reload loops as well?
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0
Re: Noscript puts FF in a reload loop
Yes. I saved the HTML code as it is without changing anything, created (and started) a new profile and installed the current dev version NoScript (11.0.39rc5). When I opened the file per drag and drop I got the reload loops immediately.
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0
Re: Noscript puts FF in a reload loop
How mysterious.
And for comparison, with .96 and that same file, I get this in the browser console
Key event not available on some keyboard layouts: key=“i” modifiers=“accel,alt,shift” id=“key_browserToolbox” browser.xhtml
Key event not available on some keyboard layouts: key=“i” modifiers=“accel,alt,shift” id=“key_browserToolbox” browser.xhtml
TypeError: MutationObserver.observe: Argument 1 is not an object. collectFormData.js:996:21
Promise resolved after context unloaded
content.js:39
Promise resolved after context unloaded
content-script.js:21
Promise resolved after context unloaded
socialwidgets.js:512
Promise rejected after context unloaded:
2 Messages.js:67
Key event not available on some keyboard layouts: key=“i” modifiers=“accel,alt,shift” id=“key_browserToolbox” browser.xhtml
And for comparison, with .96 and that same file, I get this in the browser console
Key event not available on some keyboard layouts: key=“i” modifiers=“accel,alt,shift” id=“key_browserToolbox” browser.xhtml
Key event not available on some keyboard layouts: key=“i” modifiers=“accel,alt,shift” id=“key_browserToolbox” browser.xhtml
TypeError: MutationObserver.observe: Argument 1 is not an object. collectFormData.js:996:21
Promise resolved after context unloaded
content.js:39
Promise resolved after context unloaded
content-script.js:21
Promise resolved after context unloaded
socialwidgets.js:512
Promise rejected after context unloaded:
2 Messages.js:67
Key event not available on some keyboard layouts: key=“i” modifiers=“accel,alt,shift” id=“key_browserToolbox” browser.xhtml
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0
Re: Noscript puts FF in a reload loop
(@bernie, your tracking id is valid, if that matters to you)
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:52.0) Gecko/20100101 SeaMonkey/2.49.5
Re: Noscript puts FF in a reload loop
After preventing the Web Console to clear the logs I can see the following entries again and again:
In a fresh profile with 11.0.37 I get this:
Code: Select all
sendSyncMessage suspend #0/1 SyncMessage.js:231:19
sendSyncMessage finalizing SyncMessage.js:253:19
Code: Select all
sendSyncMessage suspend #0/1 SyncMessage.js:230:19
sendSyncMessage finalizing SyncMessage.js:252:19
sendSyncMessage resume #0/0 2 SyncMessage.js:239:19
...
sendSyncMessage finalizing 2 SyncMessage.js:252:19
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0
Re: Noscript puts FF in a reload loop
It actually looks to be the break in this line that is doing it (not necessarily 1024 spaces):
Now don't know if OP's actual source has the break, or only when he copied it in here.
In any case, broken, it loops.
Break removed, OP's version is fine.
Heh, I might be wrong about that...
Code: Select all
<meta http-equiv="content-type" content="text/html; charset=us-ascii">
Code: Select all
<meta http-equiv="content-type" content=
"text/html; charset=us-ascii">
In any case, broken, it loops.
Break removed, OP's version is fine.
Heh, I might be wrong about that...
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 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0
Re: Noscript puts FF in a reload loop
Yes indeed. I do not get the reload loop without the break either.
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0
- Giorgio Maone
- Site Admin
- Posts: 9454
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: Noscript puts FF in a reload loop
Yes! Interestingly enough, it must be a CRLF: I did not get the loop until I added the 1024 bytes (not necessarily spaces) as suggested by the error messages because I'm on Linux, and therefore the break being just a LF didn't... break the charset parsing.
This looks like a legitimate Gecko bug, even though the main issue (the page entering a reload loop if the charset can't be parsed in the first 1024 bytes) still needs to be worked around.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0
Re: Noscript puts FF in a reload loop
I can reproduce this with NoScript 11.0.39rc5 + Firefox 79.0 on Windows 10, with that exact sample file. Completely default settings for both Firefox & NoScript here.
Not reproducible on Linux.
EDIT Oops, collided posting with Giorgio. Yes when pasting in Windows it used CRLF for line endings.
Not reproducible on Linux.
EDIT Oops, collided posting with Giorgio. Yes when pasting in Windows it used CRLF for line endings.
*Always* check the changelogs BEFORE updating that important software!
-
- Giorgio Maone
- Site Admin
- Posts: 9454
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: Noscript puts FF in a reload loop
Please check latest development build:
v 11.0.39rc6
============================================================
x Fix reload loops on broken file: HTML documents (thanks
bernie for report)
x [XSS] Updated HTML event attributes
v 11.0.39rc6
============================================================
x Fix reload loops on broken file: HTML documents (thanks
bernie for report)
x [XSS] Updated HTML event attributes
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0
Re: Noscript puts FF in a reload loop
Works like a charm. Thanks!!
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0
Re: Noscript puts FF in a reload loop
(These changes and the 11.0.39rc6 tag are missing from Github, and the master branch is outdated.)Giorgio Maone wrote: ↑Wed Aug 19, 2020 10:28 pm Please check latest development build:
v 11.0.39rc6
============================================================
x Fix reload loops on broken file: HTML documents (thanks
bernie for report)
x [XSS] Updated HTML event attributes
*Always* check the changelogs BEFORE updating that important software!
-
- Giorgio Maone
- Site Admin
- Posts: 9454
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: Noscript puts FF in a reload loop
Fixed, thanks.barbaz wrote: ↑Thu Aug 20, 2020 2:16 am(These changes and the 11.0.39rc6 tag are missing from Github, and the master branch is outdated.)Giorgio Maone wrote: ↑Wed Aug 19, 2020 10:28 pm Please check latest development build:
v 11.0.39rc6
============================================================
x Fix reload loops on broken file: HTML documents (thanks
bernie for report)
x [XSS] Updated HTML event attributes
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0
Re: Noscript puts FF in a reload loop
No reload loop anymore!
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0
-
- Master Bug Buster
- Posts: 244
- Joined: Wed Jan 10, 2018 7:37 am
Re: Noscript puts FF in a reload loop
11.0.39rc6 on linux. Can't reproduce the original bug with any config, so not able to say anything about how the fix handles that, BUT...
While changing permissions on any file, the permissions are not always actually changed after the reload.
This would appear to be caused by the onBeforeUnload not being removed correctly on DOMContentLoaded, which will cause the old permissions to be set after reloading.
But before you rush to fix it, consider also this example:
User could allow scripts, get the popup and immediately decide to disallow them again, which would result in a reload happening before DOMContentLoaded, onBeforeUnload running, the old permissions being set again and another popup, even if the removing of onBeforeUnload is fixed in DOMContentLoaded.
Also the timestamp in the key will eventually (with some bad luck or persistence) cause the policy to be left in the window.name. Is the timestamp necessary?
While changing permissions on any file, the permissions are not always actually changed after the reload.
This would appear to be caused by the onBeforeUnload not being removed correctly on DOMContentLoaded, which will cause the old permissions to be set after reloading.
But before you rush to fix it, consider also this example:
Code: Select all
<!doctype html>
<html>
<head>
<script>
alert("Blocking DOM so that DOMContentLoaded will not happen unless the alert is dismissed!");
</script>
</head>
</html>
Also the timestamp in the key will eventually (with some bad luck or persistence) cause the policy to be left in the window.name. Is the timestamp necessary?
Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0