-
Notifications
You must be signed in to change notification settings - Fork 102
Description
Prerequisites
- I verified that this is not a filter issue (MUST be reported at filter issue tracker)
- This is not a support issue or a question
- I performed a cursory search of the issue tracker to avoid opening a duplicate issue
- The issue is not present after wholly disabling uBlock Origin ("uBO") in the browser
- I checked the documentation to understand that the issue I report is not a normal behavior
I tried to reproduce the issue when...
- uBO is the only extension
- uBO with default lists/settings
- using a new, unmodified browser profile
Description
When configuring uBlock's managed storage properties for Firefox, properties other than adminSettings aren't being applied, but they're applied properly in Chrome and Edge. I'm using the Windows registry, but have tested quickly using a json and I think the same thing is happening.
I believe the issue is Firefox is escaping the properties and causing them to be read as strings rather than objects, as typeof (await vAPI.adminStorage.get(['toOverwrite'])).toOverwrite is string in Firefox but object in Chrome and Edge. adminSettings works as JSON.parse() is used on it, but not on the other properties, so the fix is probably more if ( typeof json === 'string' && json !== '' ) {data = JSON.parse(json);} like https://github.com/gorhill/uBlock/blob/ab6a59daf8bd183cbaf9f07d22f9d432d4adfc44/src/js/storage.js#L1392
The properties are also shown escaped on about:policies in Firefox even if they are not escaped in the registry (but not escaped on chrome://policy or edge://policy) suggesting Firefox is escaping them, but I've not been able to find anything saying this if this is expected.
A specific URL where the issue occurs
https://github.com
Steps to Reproduce
-
Configure an admin policy other than
adminSettings, egtoOverwrite[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox\3rdparty\Extensions\[email protected]] "toOverwrite"="{\"trustedSiteDirectives\": [\"example.com\",\"example.org\"]}" -
Start Firefox
Expected behavior
Settings are applied, in this example trusted sites are set to example.com and example.org
Actual behavior
Settings are applied, in this example trusted sites are not set
uBlock Origin version
1.41.8
Browser name and version
Firefox 98.0.2
Operating System and version
Windows Server 2019 17763.737