Making extensions work on file: URLs in Firefox 153

So today I had a learning experience :

Firefox Nightly apparently has decided to not allow extensions/addons to run for file:/// URLs and I am sorry, this completely breaks my environment (my startup page is a file:/// URL) and I find it infuriating. Maybe I can find some hidden toggle for this somewhere.

This is relevant to me because my start page is a local HTML file and I'm a long time user of Foxy Gestures ( cf ), which I expect to work on my home page. When it doesn't, I get upset.

This turns out to be bug 2034168, Add explicit permission for file:-access and implement extension.isAllowedFileSchemeAccess() , the components of which landed in Firefox Nightly on May 29th. Fortunately there's a way to allow extensions to still work on file: pages , but it's a bit annoying. Extensions can have per-extension additional permissions, and this change adds a new such permission, "Access local files on your computer" . But since this is a per-extension setting, you have to go through each of your extensions (at least the ones this is relevant for) and turn it on, and this permission landed only with the change, so the first time you start Firefox all your extensions will be broken.

(One hopes you don't count on something like uBlock Origin to block JavaScript embedded in local HTML pages from doing undesired stuff. Well, and have them open in your Firefox so they'll be immediately (re)loaded when Firefox starts.)

I can't really blame the Firefox developers for this. The new situation is probably more secure and likely very few people will actually notice (and it's going to be in the release notes for Firefox 153, for those of you who read them). But this is one reason why I have a whole test procedure for my custom Firefox trunk builds before I actually use them for my regular browsing.

(At this point I will give a shout out to mozregression , which allowed me to easily find the exact point where this changed and thus find bug 2034168 . If you try out Firefox Nightly on a regular basis, you might want to keep it around, perhaps via pipx .)

On the positive side, this may lead to Firefox addressing bug 1617594, Allow extensions to create tabs with file:/// URLs with an explicit permission , which would reduce the need for one of my custom Firefox changes. Although I already have that change and would probably keep carrying it in my custom Firefox builds, since I have other tweaks as well ( cf ).

PS: Firefox's motivation here seems to be not that local file-based content is untrusted but instead that it's highly trusted, and because it's highly trusted it's potentially dangerous to let extensions change what people see. Firefox has a similar but stronger block on extensions running on Firefox websites like addons.mozilla.org .