-
Notifications
You must be signed in to change notification settings - Fork 472
<noscript> is ignored when uMatrix blocks JavaScript #319
Comments
Has this situation changed in the past year? I would really like to switch from NoScript to uMatrix! It appears that there was originally an attempt to render How is NoScript doing this in a way that uMatrix cannot? |
This looks solvable, on Chromium at least. The Now, it seems obvious that the native API isn't going to work for every case or else it would've been used from the start, but I can see it working fine for simple cases where everything in a site's "script" column would be red anyway. I'm not interested in checking myself, but a similar method might work in Firefox's permissions system too. It might even end up a tiny bit more efficient if it can cause the browser to avoid pre-emptively setting up a script environment for the page. |
Scripts are blocked on the fly in uBO/uMatrix. |
@gorhill: I understand what you're saying: the browser settings only get applied one time when the tab first loads and they can't know about embedded content to whitelist in advance. But please don't dismiss it offhand for that, I wasn't asking for something impossible. I don't mean that it should replace the current script settings, but be used in addition to them. The CSP-based filtering code doesn't need to change at all; as long as the browser whitelist contains (at least) every domain scope that's whitelisted in the extension for active content (including It might behave slightly differently — that's the whole point of the bug report — but I can't think of any situations where it'd add breakage except contrived ones (like whitelisting a site that relies entirely on self-contained onclick handlers, and then trying to use it without reloading). It'd make it a little harder for pages to detect when someone has this installed, too. (If I'm being dumb and this really is impossible for some reason, can we at least have an option to unlock the browser JS settings and do it manually?) |
My opinion on this is simple: if you have an idea, work on it to make the case that it works. |
Just an idea thrown without any knowledge of the uMatrix internals: if there is a way to check that scripts have been intercepted by uMatrix for a given page, why not simply grab the inner html of this page noscript tags, insert it before the noscript tag and then delete the noscript tag ? |
Browsers ignore |
'ignore' like 'do not include them in the DOM' so that there is no way to have access to their content ? |
There are not parsed, they are discarded. The real solution was implemented before, I removed it when I refactored HTTPSB -- it had its own quirks. |
I am going to revive the original code to spoof It will however be a per-scope switch: for the
By default the As with other per-scope switches, there will be a default state in the Settings pane in the dashboard. |
Fixed with 9d43f92. |
Thanks! =) |
Another quirk to fix: the automatic redirection won't work if the URL is not absolute, I need to fix this for next release. |
Be careful with allowing meta refresh. That was used by that famous hacker guy after he got out of prison and I've tried to keep it blocked ever since. If it is default block, allow on selected trusted sites, as I think you're planning, then I think that is generally OK (except for when a site gets hacked by dudes like him). |
The meta refresh will be triggered only if 1st-party scripts are blocked and the |
@grumpygeek I did not hear this story :D Do you have a link to share? |
Don't want to hijack Gorhill's thread. Also want to avoid mentioning the guy's name. So here, https://tinyurl.com/pdlzg3s |
If JavaScript is blocked by uMatrix, <noscript>-sections are ignored. This breaks several webpages, e.g. Google image search, and other sites which offer an alternative non-JavaScript-version. So, if I use uMatrix for blocking JavaScript, I have to enable JavaScript on many sites which would work fine without JavaScript. :(
Similar problems were described in #260 and #292, and #232 looks related.
I think the right way would be to execute the <noscript>-sections if JavaScript is disabled/blocked by uMatrix. Is this possible with uMatrix?
I would love it if this would be possible with uMatrix, since I then wouldn't need NoScript anymore.
Current workaround: Use NoScript to block JavaScript; then, <noscript>-tags work. (But I would like to use uMatrix, since it's easier to use, has a better user-interface, and is a one-tool-for-all-tool.)
How to reproduce:
Set "Allow scripts globally" in NoScript, effectively disabling NoScript. Now, <noscript>-contents are ignored, and e.g. Google image search shows a blank page.
Set "Forbid scripts globally" in NoScript. Now, NoScripts blocks JavaScript and <noscript>-contents work.
Examples:
The text was updated successfully, but these errors were encountered: