What’s going on in the world of extensions
blog.mozilla.org
blog.mozilla.org
https://bugzilla.mozilla.org/show_bug.cgi?id=1786919
They have merged a change that makes it impossible to access and download certain website content the user is viewing and wants to process. Now that Firefox has introduced this limitation without offering an alternative, it is now much easier to port some of my extensions to Manifest V3 on Chrome, despite Chrome not supporting the blocking webRequest API.
It's disheartening to see how these changes are introduced without any planning or care for how it affects extensions that are being ported to Manifest V3, and the general lack of respect towards extension developers.
Firefox is going to continue to have more powerful blocking features compared to what a DNS based approach like pihole can provide.
[1]: https://assets.mozilla.net/annualreport/2021/mozilla-fdn-202...
Or, rephrased: could gorhill conceivably upgrade uBlock Origin's manifest.json to v3, while still using the v2 content blocking APIs?
(Most recent example that I have in mind: they switched content dark mode from matching OS theme to matching browser theme in 95, despite quite a few immediate and detailed objections as soon as the patch landed on Nightly—and yes, I’m willing to admit that the change will match what some, perhaps more, users want—but didn’t expose it in about:preferences until 100; to my eye, they should fairly obviously have reverted the change until they had that setting, or at the very least mentioned the about:config pref to restore the old behaviour in the release notes. At least in that case there was still a pref for it.)
For reference for people who haven't read the linked bug: the change makes it forbidden to alter CORS and related security headers via extensions, and invites developers to provide use cases where it is necessary so that proper permissions can be designed to permit this. OP complains that this is unreasonable, because... well, "the use case [is] already obvious to your team".
It's certain that 2 years from now extension developers will still be getting support requests and receive negative reviews because of that commit, even if an alternative API is released in the next few months. But who cares, it's not you who has to find a solution and deal with users.
All of this could have been averted by simply offering an alternative API in the same browser version in which the new restriction was implemented. There was no pressing need to immediately restrict the API.
> Disallowing the modification of Access-Control-Allow-* response headers will impact extensions that need to download page content.
> Search by Image sets CORS headers for some images in order to download them from the content script before uploading to a search engine. In many cases an asset will only be served if the request contains the correct origin, referrer and cookies. Reproducing such a fetch request was impossible from a background page last time I tested, and even if configuring all aspects of a request becomes possible, it could still open up extensions to security issues, because it's difficult to figure out if certain data types would be sent by the browser if the request would be made from the page context, such as the referrer. We would also need to request additional permissions, such as access to HTTP cookies.
> Extensions used for archiving pages would no longer be able to create faithful representations of the tab content. Advanced ad blockers such as uBlock Origin would be impacted as well. There is a general issue of extensions not being able to access certain parts of the page, such as a tainted canvas in Chrome, or a closed shadow DOM in Safari, and this restriction would make the problem worse.
> All of this could have been averted by simply offering an alternative API in the same browser version in which the new restriction was implemented.
You mean like manifests v2, which wasn't affected?
I will also note, it was this comment in particular that set me off:
> It must be possible to prevent a patch from being released in the stable version of Firefox. You must be aware that this change will make it difficult to port extensions that need to access arbitrary page content. Extension developers have enough work on their hands already, and we shouldn't need to spend more time submitting feature requests and then defending use cases that are already obvious to your team.
This kind of "I demand you do what I want, and I'm going to refuse any attempt to answer why you should" comment is one that I believe it reasonable for a developer to ignore.
Regarding your edit, I have not demanded anything, but asked if it would be possible to delay the release, for all the discussed reasons. For which I have received a non-answer, "it has already been merged" is not a valid reason for not correcting a mistake, and asking people to invest even more of their time in this and repeat what has already been discussed in a new bug report was just the last drop that made the lack of respect for other people's time obvious.
Mozilla will continue to support V2 and working towards V3 support. Expecting a fully compatible implementation on the first go is a lot. Especially since Mozilla has a fraction of the budget and other priorities besides aping Chrome.
I hope reading the linked pull request thread and the comments here will make it easier to see what went wrong, and why listening to the people that work with these extension APIs is important.
This is currently impossible on Firefox as they forget extension loaded from local files to be removed after. The force everyone who wants to run their own code on their own machine persistently to file for a developer code signing certificate, essentially copying Apple's approach to marketplace management.
Further, this limitation makes auditing the code of extensions you install from third party sources effectively impossible: I don't see any way to stop automatic updates in settings, so at any point the third party code you've installed and enabled to execute on any website you visit can just change out from under you workout warning.
This is all trivial in Edge.
It is difficult to understand where the HN vulpephillia comes from.
I imagine it is in part backlash, fueled by political impulse. Mozilla's appointment of Mitchell Baker and subsequent course of Firefox development have taken on unmistakable political valence in the US culture war (especially seeing how its drift could be uncharitably glossed as "coddling non-technical users at the expense of power users"), which resulted in criticism invariably sounding like, and, I guess, even really somewhat functioning* as an attack on the political group that Mozilla is associated with. This, in turn, makes those who support said political group, or simply are exasperated with its most vocal opponents, instinctively oppose the criticism.
*I'm thinking of something like the affect-loading concept in https://slatestarcodex.com/2014/11/04/ethnic-tension-and-mea....
My distro's firefox package loads extensions I zip'd and placed in /usr/lib64/firefox/browser/extensions , probably because it's compiled with `--with-unsigned-addon-scopes=app --allow-addon-sideload`
FOSS authors are catching on to all the tricks that Windows etc closed source authors have been doing - locking down their software, phoning home with telemetry, bundling in closed-source components with non-free licenses and what not. Distro maintainers are the last line of defence against this shit. Don't use upstream binaries.
xpinstall.signatures.required
At least I think thats the one. Also extension updating can be disabled globally or on a per extension basis in the addons setting page.
Edit: note that you have to package (zip) the extension. You can't keep an unpacked extension loaded.
The official branded releases only require signatures because everything else they tried to stop malware hijacking the browser ultimately failed. Mozilla are not trying to copy iOS, they don't stop you leaving the walled garden if you want to.
So basically Mozilla telling developers: want to be able to run your own code? Fine. But only if you use a months-old browser subject to a bunch of security vulnerabilities we keep a list of on our website for any would-be attacker to consult.
[1] https://www.mozilla.org/en-US/security/advisories/mfsa2023-0...
• https://wiki.mozilla.org/Add-ons/Extension_Signing#Unbranded... (click “release”)
• https://treeherder.mozilla.org/jobs?repo=mozilla-release&sea... (click the date of the most recent complete build)
• https://treeherder.mozilla.org/jobs?repo=mozilla-release&sea... (click “B” next to your desired platform, OS X in my case)
• https://treeherder.mozilla.org/jobs?repo=mozilla-release&sea... (click “Artifacts and Debugging”, then “target.dmg”/“target.zip”)
• https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task...
… then I get a “Nightly” build reporting version 109.0.1.
The direct links to the latest releases should be better maintained for sure, and it did take me longer than I'd like to figure out the build interface.
Hit the gear and uncheck "Update Add-ons Automatically".
>This is all trivial in Edge.
Is it? I can't find the toggle for extension autoupdates in Edge, and a search only turns up hacky methods for Chrome, nothing specific to Edge.
Thanks, my bad for looking for settings in Settings.
> Is it? I can't find the toggle for extension autoupdates in Edge, and a search only turns up hacky methods for Chrome, nothing specific to Edge.
I can't speak to extensions downloaded from the store, as I only sideload. But when sideloaded, the extensions of course do not update unless you explicitly pull changes in or make changes yourself. Sideloading itself is trivial, even Stable builds provide a "Developer Mode" toggle that allows loading unsigned unpacked extensions from local directories.
It allows you to disable extensions only on specific sites. (And presumably, that's also the reason you need to dive into about:config to remove it: if you remove it, it's pretty hard for casual users to find out why an extension isn't working. By gating it behind about:config, people who are able to deal with that can still remove it without rendering casual users helpless. That's my personal interpretation though.)
Hopefully that can be addressed at some point in the near future :)
I'd rather use the version of Firefox that doesn't crash more frequently, but that's the trade-off I gotta make at the moment.
You can create your own "extension collection", and change the default one used by FF on Android. I use the Fennec build of FF from F-droid (Playstore build doesn't support this).
Currently I'm using Iceraven which is essentially just Firefox with about a thousand extensions enabled instead of 17.
https://blog.mozilla.org/addons/2022/12/15/new-extensions-av...
I had to chuckle from mentally constructing a character that would fit all of this.
Kind of hoping I can actually order the extensions at some point though, it's a bit messy if you can no longer control which extensions are in the overflow menu or what order they're in.
Does anybody know whether this change allows me (the user) to grant an extension permission to a specific, arbitrary domain only? That is, to take an extension which wants permission to read and write every website, and sandbox it to only a particular set of user-defined domains? Have wanted this for a while.
We don't touch anything but the websites a customer already owns, but there are a lot of design choices that really seem to focus on making adblockers (or cookie blockers, JS blockers etc) harder to make (in addition to some very reasonable cross-domain security choices that are annoying but 100% legit).
I guess I'm getting old and grouchy.
If you asked the average user about their privacy preserving add-on, or their content blocker they would probably be confused.
Yes, obviously I understand the privacy dimensions of advertising, and I realize that this is all in the service of the good guys and against the bad guys, but that shouldn't affect our response to what seems to me to be unnecessary spin.
I completely agree: it is a good rhetorical move. aka good spin. But I don't think we should celebrate that sort of thing in tech blog posts, or in any writing actually unless your work in marketing.
I use them, and DNS filters, to block stalking. They just happen to block adverts too because it is practically impossible to separate the two ATM. I'll accept ads based on the page I'm looking at and my rough geographical position, but I don't see why I should put up with being followed and profiled everywhere I go.
But crucially, not just ads — they block trackers, known malware source, etc. "Content blockers" encompasses everything that these tools do.
If ads give you the ick, then one distinction we’ve made around ad blockers has been especially crucial to privacy-lovers everywhere.
> If ads give you the ick, then one distinction we’ve made around ad blockers has been especially crucial to privacy-lovers everywhere.