Local rust docs not loading when Noscript active

Ask for help about NoScript, no registration needed to post
phyzome
Posts: 12
Joined: Wed Aug 12, 2009 6:52 pm

Local rust docs not loading when Noscript active

Post by phyzome »

I'm using NoScript 13.5.12 on Firefox 140.7.0esr and I'm unable to run scripts on *some* local files. So far I've only observed it in Rust (programming language) docs -- I generate the docs locally, and open them in the browser, but the search and settings features don't work. If I disable Noscript, they work. (file: is marked trusted, of course.) This was working a couple months ago, but I hadn't used docs since then so I'm not sure when things broke.

These is what I see in the console:

Code: Select all

Freezing file:///home/phyzome/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/std/index.html <html lang="en"></html>
DocumentFreezer.js:142:15

Uncaught ReferenceError: getVar is not defined
    <anonymous> file:///home/phyzome/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/static.files/main-a410ff4d.js:1
main-a410ff4d.js:1:917

Unfreezing file:///home/phyzome/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/std/index.html off-document 
<html lang="en">...
DocumentFreezer.js:167:17

Uncaught SyntaxError: redeclaration of const MAIN_ID
    <anonymous> file:///home/phyzome/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/static.files/main-a410ff4d.js:1
main-a410ff4d.js:1:1
What's *really* weird is that when I created a new Firefox profile and loaded the docs, it worked fine, but when I then installed Noscript in that new profile and toggle file: permissions on and off, scripts in the file only worked when file: was disallowed. However, I couldn't reproduce that in yet another blank profile. :shock:

So I feel like something is off with how file: docs are being handled?
Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
phyzome
Posts: 12
Joined: Wed Aug 12, 2009 6:52 pm

Re: Local rust docs not loading when Noscript active

Post by phyzome »

(Still trying to figure out how to provide a reasonable copy of these files so someone else can reproduce this -- but the docs weigh in at 725 MB across 50,000 files... I'll see if I can get something smaller!

But yes, this involves local files loading other local files. No errors in the network tab, though.)
Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
phyzome
Posts: 12
Joined: Wed Aug 12, 2009 6:52 pm

Re: Local rust docs not loading when Noscript active

Post by phyzome »

OK, managed to make a relatively small repro case: https://lab.brainonfire.net/testcase/no ... 260215.zip (1.6 MB)
Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
barbaz
Senior Member
Posts: 11151
Joined: Sat Aug 03, 2013 5:45 pm

Re: Local rust docs not loading when Noscript active

Post by barbaz »

Locally-installed Rust documentation works for me (but I'm on Firefox 147.0.4). Try setting file: to CUSTOM and enable all capabilities shown...
phyzome wrote: Mon Feb 16, 2026 1:58 am this involves local files loading other local files
... especially, make sure the local-file-specific "x-load" capability is enabled
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0
phyzome
Posts: 12
Joined: Wed Aug 12, 2009 6:52 pm

Re: Local rust docs not loading when Noscript active

Post by phyzome »

When I click custom, all the capabilities are already checked. But I don't see x-load as an option.

Image
Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
barbaz
Senior Member
Posts: 11151
Joined: Sat Aug 03, 2013 5:45 pm

Re: Local rust docs not loading when Noscript active

Post by barbaz »

Do you see it when editing CUSTOM permissions for file: in NoScript Options > Per-site Permissions?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0
phyzome
Posts: 12
Joined: Wed Aug 12, 2009 6:52 pm

Re: Local rust docs not loading when Noscript active

Post by phyzome »

Yes! I've now enabled it.

When I reopen the page and open CUSTOM for file:, I now see x-load for file:. It's still not working, though.

(I don't see x-load in the list when I select the full URL in the dropdown, so I also made sure to click Reset when that was selected, and to ensure there wasn't a per-site permission saved for the full URL.)
Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
barbaz
Senior Member
Posts: 11151
Joined: Sat Aug 03, 2013 5:45 pm

Re: Local rust docs not loading when Noscript active

Post by barbaz »

With Firefox 140.7.0esr in a VM I reproduced this twice when starting Firefox from terminal with the Rust documentation page as a command-line argument (i.e. Firefox was not already running, as opposed to having already opened Firefox first and then dragging in the Rust documentation file). Force-reload the Rust documentation page with Ctrl+Shift+R got it working correctly. Then I could not reproduce it again, even though Firefox was being run in a disposable sandbox that got dumped on quit, where the Rust documentation was never loaded at all in the unsandboxed Firefox profile.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0
Post Reply