Closed Bug 1668374 Opened 1 year ago Closed 1 year ago

New Preference policy doesn't work on macOS

Categories

(Firefox :: Enterprise Policies, defect, P1)

defect

Tracking

()

VERIFIED FIXED
83 Branch
Tracking Status
firefox-esr78 --- verified
firefox82 --- verified
firefox83 --- verified

People

(Reporter: mkaply, Assigned: mkaply)

Details

Attachments

(1 file)

Because macOS converts all booleans to 0/1, the new Preferences policy doesn't work there.

Status: NEW → ASSIGNED
Attachment #9178842 - Attachment description: Bug 1666836 - Treat 0/1 as boolean in policy unless there is an existing int pref. r?emalysz! → Bug 1668374 - Treat 0/1 as boolean in policy unless there is an existing int pref. r?emalysz!
Pushed by mozilla@kaply.com:
https://hg.mozilla.org/integration/autoland/rev/1ed849fcf90c
Treat 0/1 as boolean in policy unless there is an existing int pref. r=emalysz
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch

Emil:

Can you take a quick look at this one as well? This is a bug with the new preferences code. See:

https://github.com/mozilla/policy-templates/blob/master/README.md#preferences

An example mobile config would be:

<dict>
  <key>Preferences</key>
  <dict>
    <key>accessibility.force_disabled</key>
    <dict>
      <key>Value</key>
      <integer>1</integer>
      <key>Status</key>
      <string>default</string>
    </dict>
    <key>browser.tabs.warnOnClose</key>
    <dict>
      <key>Value</key>
      <false/>
      <key>Status</key>
      <string>locked</string>
    </dict>
  </dict>
</dict>

Testing should be similar to bug 1666836

Thanks!

Flags: needinfo?(emil.ghitta)

Sure!

I have extended the scope a little bit (in order to include a couple of more prefixes + some of the security preferences).

I can confirm that issue is verified fixed using Firefox 83.0a1 (BuildId:20201002092536) - The preferences in question are successfully set to true/false and locked (where needed).

Used the following mobileconfig:

 <key>Preferences</key>
  <dict>
         <key>accessibility.force_disabled</key>
   <dict>
           <key>Value</key>
           <integer>1</integer>
           <key>Status</key>
          <string>default</string>
   </dict>
           <key>browser.tabs.warnOnClose</key>
    <dict>
            <key>Value</key>
           <false/>
           <key>Status</key>
           <string>locked</string>
    </dict>
	   <key>print.tab_modal.enabled</key>
     <dict>
	    <key>Value</key>
            <integer>0</integer>
	   <key>Status</key>
	   <string>locked</string>
      </dict>
	    <key>datareporting.policy.dataSubmissionEnabled</key>
	<dict>
	     <key>Value</key>
	     <false/>
	    <key>Status</key>
	    <string>locked</string>
	</dict>
	    <key>media.audioFocus.management</key>
	   <dict>
	      <key>Value</key>
	     <false/>
	     <key>Status</key>
	     <string>locked</string>
	</dict>
	     <key>intl.allow-insecure-text-input</key>
           <dict>
	      <key>Value</key>
	      <false/>
	      <key>Status</key>
	      <string>locked</string>
	</dict>
	      <key>geo.enabled</key>
	    <dict>
	      <key>Value</key>
              <integer>1</integer>
              <key>Status</key>
              <string>locked</string>		
              </dict>
		<key>security.insecure_connection_text.enabled</key>
			<dict>
				<key>Value</key>
				<true/>
				<key>Status</key>
				<string>locked</string>
			</dict>		
                       <key>security.insecure_connection_text.pbmode.enabled</key>
		<dict>
			<key>Value</key>
			<integer>0</integer>
			<key>Status</key>
			<string>locked</string>
		</dict>
		</dict>
  </dict>
Status: RESOLVED → VERIFIED
Flags: needinfo?(emil.ghitta)

Awesome. Thank you!

Comment on attachment 9178842 [details]
Bug 1668374 - Treat 0/1 as boolean in policy unless there is an existing int pref. r?emalysz!

Beta/Release Uplift Approval Request

  • User impact if declined: New Preferences policy doesn't work on macOS.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • 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): Policy only, automated test, verified by QA.
  • 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.
  • User impact if declined: New Preferences policy doesn't work on macOS.
  • Fix Landed on Version: 83
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Policy only, automated test, verified by QA.
  • String or UUID changes made by this patch:
Attachment #9178842 - Flags: approval-mozilla-esr78?
Attachment #9178842 - Flags: approval-mozilla-beta?

Comment on attachment 9178842 [details]
Bug 1668374 - Treat 0/1 as boolean in policy unless there is an existing int pref. r?emalysz!

approved for 82.0b8 and 78.4.0esr

Attachment #9178842 - Flags: approval-mozilla-esr78?
Attachment #9178842 - Flags: approval-mozilla-esr78+
Attachment #9178842 - Flags: approval-mozilla-beta?
Attachment #9178842 - Flags: approval-mozilla-beta+

This issue is verified fixed using the mobileconfig from comment 5 on macOS 10.13.
Tested using Firefox 82.0 (BuildId:20201014125134) and Firefox 78.4.0esr (BuildId:20201013163257)

You need to log in before you can comment on or make changes to this bug.