Closed Gabgobie closed 4 months ago
Addon IDs have to be exact, so none of these things that you've posted will work.
What exactly are you to accomplish?
Block extensions but only allow langpacks?
Hi, thanks for your quick answer. The above state is already me trying to work around the issue. The original configuration was very similar to the example you provide in the repo.
"ExtensionSettings": {
"*": {
"blocked_install_message": "\n\nCustom Error Message",
"install_sources": [
"https://addons.mozilla.org/*"
],
"installation_mode": "blocked",
"allowed_types": ["extension", "theme"]
},
"uBlock0@raymondhill.net": {
"updates_disabled": false,
"installation_mode": "force_installed",
"install_url": "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi",
"default_area": "menupanel"
},
"jid1-MnnxcxisBPnSXQ@jetpack": {
"updates_disabled": false,
"installation_mode": "force_installed",
"install_url": "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger17/latest.xpi",
"default_area": "menupanel"
}
},
My goal is to install some extensions, allow others (in a later iteration) and block every extension that is not whitelisted, however as soon as the catchall block is present, firefox is reduced to only include the en-US locale.
Application Settings
Requested Locales ["de-DE"]
Available Locales ["en-US"]
App Locales ["en-US"]
Regional Preferences ["en-US"]
Default Locale "en-US"
Operating System
System Locales ["de-DE"]
Regional Preferences ["de-DE"]
When I remove the catchall block or reduce it to only contain the blocked_install_message
, all the locales that are installed by default return.
Anwendungseinstellungen
Angeforderte Sprachen ["de-DE"]
Verfügbare Sprachen ["kab","hsb","ms","ka","ro","sr","de","kk","af","tl","es-AR","en-CA","en-US","da","nl","gu-IN","lv","el","fur","be","en-GB","hy-AM","bn","szl","sl","sq","lij","ga-IE","ia","cy","es-MX","eu","ja","mk","my","kn","rm","eo","ru","th","vi","bs","ko","ast","nn-NO","oc","hi-IN","ff","ne-NP","pa-IN","ta","hu","es-CL","bg","ar","es-ES","sc","te","trs","hr","fi","cak","km","pt-BR","cs","pt-PT","si","zh-CN","ach","he","gd","is","az","xh","ca","et","fy-NL","gn","lt","sv-SE","mr","uz","br","dsb","fa","uk","fr","ur","id","tr","zh-TW","pl","nb-NO","tg","an","son","it","sco","sk","gl"]
Anwendungssprachen ["de","en-US"]
Region-Einstellungen ["de-DE"]
Standardsprache "en-US"
Betriebssystem
Sprachen des Betriebssystems ["de-DE"]
Region-Einstellungen ["de-DE"]
Thanks again for your help.
Best, Gab
It's because of this line:
"allowed_types": ["extension", "theme"]
You've blocked langpacks.
I would remove
"install_sources": [
"https://addons.mozilla.org/*"
],
and
"allowed_types": ["extension", "theme"]
and you should be good.
all the locales that are installed by default return.
I'm unclear why this is a problem?
Are you installing all the langpacks in Firefox?
It's because of this line:
"allowed_types": ["extension", "theme"]
You've blocked langpacks.
I tried with "allowed_types": ["extension", "theme", "dictionary", "locale"]
, I tried with "allowed_types": []
and I tried without allowed_types
. Always the same result. The locales are gone.
I would remove
"install_sources": [ "https://addons.mozilla.org/*" ],
and
"allowed_types": ["extension", "theme"]
and you should be good.
That would leave me with the following catchall block:
"*": {
"blocked_install_message": "\n\nCustom Error Message",
"installation_mode": "blocked"
}
unfortunately this will still remove all installed locales.
all the locales that are installed by default return.
I'm unclear why this is a problem?
It's not. It's the desired state. I want the locales to be available but they are removed from firefox as soon as my catchall block contains anything besides the blocked_install_message
directive.
Are you installing all the langpacks in Firefox?
I'm on Rockylinux 9.4. The locales listed in my above comment are all installed by default and I'd like them to be available.
Sorry, I missed this response.
You would have to list each locale individually in order to keep them from being uninstalled.
Thanks for your answer.
This is very unfortunate. I was really hoping there was a way to install and restrict extensions without influencing the other plugins -> Disallow extensions without disallowing any locales, themes and dictionaries.
Now I am somewhat confused about the allowed_types
though. What are they defining? As soon as the section exists everything that is not explicitly stated below is disallowed so I don't see any point in them if they don't exclude anything categories from the blacklist.
Actually, maybe we're thinking about this wrong.
What if you remove
"installation_mode": "blocked",
and change "allowed_types" to
"allowed_types": ["theme", "langpack", "dictionary"]
What this would do is block all extensions (because we don't have them in allowed_types) but it would still allow ones you specify by ID and allow all your locales.
allowed_types was copied from Chrome. It's basically "allow users to install themes/langpacks, but no extensions" or something like that.
But I think that if you use it, using installation mode becomes unnecessary.
I'll try that. Brb
That did the trick.
"installation_mode": "blocked",
seems to block everything. Without it, "allowed_types"
works as expected.
Thanks a lot.
Awesome!
Hi,
I am currently trying to configure Firefox using the
/etc/firefox/policies/policies.json
but as soon as I have a default rule for the ExtensionSettings section, the browser will loose all localization and lock down to english only. Everything else works as expected.Broken localization:
The relevant
about:support
section:Functional Localization:
And another version of functional localization:
The relevant
about:support
section:I don't know what I'm doing wrong or if this is a bug. Tried it with Firefox 115.12.0esr on Rockylinux and the most recent flatpak (I think 127, already uninstalled) to make sure it wasn't an issue with my specific version. Any help would be greatly appreciated.