Legacy boolean preferences don't work in GPO or macOS
Categories
(Firefox :: Enterprise Policies, defect, P1)
Tracking
()
People
(Reporter: mkaply, Assigned: mkaply)
References
Details
Attachments
(1 file, 1 obsolete file)
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
RyanVM
:
approval-mozilla-release+
RyanVM
:
approval-mozilla-esr78+
|
Details | Review |
When I moved to the new preferences model, I put in code for handling legacy preferences, but I missed the fact that we were using the explicit schema type (boolean) to allow 0/1 to be converted to a boolean before it was passed to the preferences APIs.
As a result, we are now trying to get the prefs with a 0/1 value which isn't working.
Assignee | ||
Comment 1•4 years ago
|
||
[Tracking Requested - why for this release]: If we do a dot release, we'll need to fix this. I'm not sure how wide spread it is yet.
Assignee | ||
Comment 2•4 years ago
|
||
Pushed by mozilla@kaply.com: https://hg.mozilla.org/integration/autoland/rev/fe060ab6199d Set bools correct with legacy preferences. r=emalysz
Comment 4•4 years ago
|
||
bugherder |
Assignee | ||
Comment 5•4 years ago
|
||
Comment on attachment 9177441 [details]
Bug 1666836 - Set bools correct with legacy preferences. r?emalysz!
Beta/Release Uplift Approval Request
- User impact if declined: Legacy preference policy doesn't work correctly.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Automated test, policy only.
- String changes made/needed:
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Policy related fix.
- User impact if declined: Legacy preference policy doesn't work correctly.
- Fix Landed on Version: 83
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Automated test, policy only.
- String or UUID changes made by this patch:
Comment 6•4 years ago
|
||
If we're thinking we should take this in a dot release, we should also probably get QA to give this a test when they get a chance.
Assignee | ||
Comment 7•4 years ago
|
||
Good call.
So to test, install the Firefox ADMX from here on Windows:
https://github.com/mozilla/policy-templates/releases/tag/v2.3
And verify that any of the boolean Preferences in the Preferences category properly set and lock their values.
For example:
geo.enabled
Comment 8•4 years ago
|
||
Comment on attachment 9177441 [details]
Bug 1666836 - Set bools correct with legacy preferences. r?emalysz!
Approved for 82.0b3 so we can get some wider testing. I'd still feel better if we were able to do more exploratory testing around this before shipping it in dot releases.
Comment 9•4 years ago
|
||
bugherder uplift |
Updated•4 years ago
|
Assignee | ||
Comment 10•4 years ago
|
||
This is a worse problem than I realized. macOS converts everything to 0/1 as well. Unfortunately we don't have good mobileconfig tests either.
I have a more inclusive patch and I'm adding tests to handle the 0/1 case.
Assignee | ||
Comment 11•4 years ago
|
||
Updated•4 years ago
|
Comment 12•4 years ago
|
||
It seems to affect also the enterprise policies.
For example the policy "extensions.blocklist.enabled":1 is not applied any more since 81.
Updated•4 years ago
|
Comment 13•4 years ago
|
||
Pushed by mozilla@kaply.com: https://hg.mozilla.org/integration/autoland/rev/f9ad61f28238 Treat 0/1 as boolean in policy unless there is an existing int pref. r=emalysz
Comment 14•4 years ago
|
||
Backout by csabou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7e9c740d3bd7 Backed out changeset f9ad61f28238 for bc failures on browser_policies_setAndLockPref_API.js. CLOSED TREE
Comment 15•4 years ago
|
||
Backed out for bc failures on browser_policies_setAndLockPref_API.
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=316971344&repo=autoland
https://treeherder.mozilla.org/logviewer.html#?job_id=316972900&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/7e9c740d3bd716cac3a58356ff7e2ca93a3fbf18
Assignee | ||
Comment 16•4 years ago
|
||
I'm closing this because the first patch fixed this problem and stands alone. I'm going to open a new bug for the second issue.
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 17•4 years ago
|
||
Comment on attachment 9177995 [details]
Bug 1666836 - Treat 0/1 as boolean in policy unless there is an existing int pref. r?emalysz!
This is being moved to a new bug.
Comment 18•4 years ago
|
||
Comment on attachment 9177441 [details]
Bug 1666836 - Set bools correct with legacy preferences. r?emalysz!
Approved for 81.0.1 and 78.3.1esr.
Comment 19•4 years ago
|
||
I have managed to reproduce this issue using Firefox 81.0 (BuildId:20200917005511) on Windows 10 64bit by encountering the "Error running" policy error for some boolean preferences (from the GPO legacy Preferences category folder).
This issue seems to be fixed using Firefox 82.0b4 (BuildId:20200926073307) and Firefox 83.0a1 (BuildId:20200928212824).
Windows: I've went through the majority of the legacy Preferences displayed inside the Preferences folder via GPO and verified the following preferences states:
- Verified the Locked to Enabled state (1)
- Verified the Locked to Disabled state (0)
- Verified the Disabled state (0) (no effect state - where applicable)
macOS 10.13: I've set up a mobileconfig file which contained several legacy preferences (browser.urlbar.suggest.openpage
, dom.allow_scripts_to_close_windows
and network.dns.disableIPv6
) and it worked for me (the preferences are successfully locked to true/false.
Leaving a ni? on myself to verify this once it lands in other versions as well.
Updated•4 years ago
|
Comment 20•4 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-esr78/rev/afe18e892761 (FIREFOX_ESR_78_3_X_RELBRANCH)
https://hg.mozilla.org/releases/mozilla-esr78/rev/138658fea9c0 (default)
Comment 21•4 years ago
|
||
bugherder uplift |
Comment 22•4 years ago
|
||
Added to the Firefox 81.0.1 and 78.3.1esr relnotes:
Fixed legacy preferences not being properly applied when set via GPO
Assignee | ||
Comment 23•4 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1668374 opened for followup
Comment 25•4 years ago
|
||
This issue is verified fixed using Firefox 81.0.1 (BuildId: 20200930150533) and Firefox 78.3.1esr (BuildId:20200929151419) on Windows 10 64bit (via GPO) and macOS 10.13 (via mobileconfig)
Description
•