Closed Bug 1568855 Opened 5 years ago Closed 5 years ago

When a homepage is set via policies, preferences still says the homepage is Firefox Home

Categories

(Firefox :: Settings UI, defect, P1)

defect

Tracking

()

VERIFIED FIXED
Firefox 70
Tracking Status
firefox-esr68 --- verified
firefox68 --- wontfix
firefox69 --- verified
firefox70 --- verified

People

(Reporter: mkaply, Assigned: mkaply)

References

Details

Attachments

(1 file)

If you change the home via policies (or other locking methods), the homepage setting in preferences does not reflect those settings.

It shows Firefox Home as the homepage.

It should show Custom URL

The problem is here:

https://searchfox.org/mozilla-central/rev/40e889be8ff926e32f7567957f4c316f14f6fbef/browser/modules/HomePage.jsm#

Just because the default value matches the current value doesn't mean that it's Firefox home.

We should be explicitly checking for about:home.

Pushed by mozilla@kaply.com:
https://hg.mozilla.org/integration/autoland/rev/4d8cee124c4e
Setting a new default homepage should switch to Custom URL in prefs. r=jaws
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70

Comment on attachment 9080734 [details]
Bug 1568855 - Setting a new default homepage should switch to Custom URL in prefs.

Beta/Release Uplift Approval Request

  • User impact if declined: In enterprise and distribution situations, prefs don't reflect the actual homepage/
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Lock a homepage via policy.
    Verify that prefs has Custom URL and is shows the URL
  • 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, only affects this unique case.
  • String changes made/needed:
Attachment #9080734 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Comment on attachment 9080734 [details]
Bug 1568855 - Setting a new default homepage should switch to Custom URL in prefs.

P1, low risk patch with tests, on mozilla-central for a few days without reported regressions, approved for 69 beta 11, thanks.

Attachment #9080734 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

I'm having difficulties reproducing/verifying this bug, I'm not sure what I'm not doing right but I'll write down the steps:

  1. Created a folder called "distribution" in the directory where Fx is installed.
  2. Created a file called policies.json under the distribution folder and apply the following code inside the json file:
    {
    "policies": {
    "Homepage":{
    "URL": "https://www.facebook.com",
    "StartPage":"homepage",
    "Locked":true
    }
    }
    }
  3. Launched Firefox.

But the homepage and also " browser.startup.homepage" pref are not changed.

Flags: needinfo?(mozilla)

This is working for me. Is it possible you are using Windows and already have group policy enabled so policies.json isn't read?

What does about:policies say?

Flags: needinfo?(mozilla)

I tried on both Windows 10 and on Mac (on mac I put policies.json in "resources" folder).
On Windows I tried to disable "Turn off background refresh of Group Policy" but I had the same results.

In about:polices#active it says: The Enterprise Policies service is inactive.

Please let me know if you have other suggestions.

Flags: needinfo?(mozilla)

I'm assuming we'll want this on esr68 eventually.

policies.json should go in a distribution folder in resources (not just resources)

Flags: needinfo?(mozilla)

I have managed to reproduce this issue using Firefox 70.0a1 (BuildId:20190716112534) on Windows 10 64bit.

This issue is verified fixed using Firefox 70.0a1 (BuildId:20190813095543) and Firefox 69.0b12 (BuildId:20190807220259) on Windows 10 64bit, macOS 10.10.5 and Ubuntu 18.04 64bit.

Leaving a ni? on myself as a reminder to verify this on esr as well.

Status: RESOLVED → VERIFIED
Flags: needinfo?(emil.ghitta)

Comment on attachment 9080734 [details]
Bug 1568855 - Setting a new default homepage should switch to Custom URL in prefs.

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Makes preferences code more clear around policies and homepage
  • User impact if declined: Preferences don't properly reflect the homepage
  • Fix Landed on Version: 69,70
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Has baked on trunk.
    Has automated test.
  • String or UUID changes made by this patch:
Attachment #9080734 - Flags: approval-mozilla-esr68?

Comment on attachment 9080734 [details]
Bug 1568855 - Setting a new default homepage should switch to Custom URL in prefs.

Policy engine fix. Approved for 68.1esr.

Attachment #9080734 - Flags: approval-mozilla-esr68? → approval-mozilla-esr68+

I have managed to reproduce this issue using Firefox 70.0a1 (BuildId:20190716112534) on Windows 10 64bit.

This issue is verified fixed using Firefox 60.9.0esr (BuildId:20190901094603) on Windows 10 64bit, Ubuntu 16.04 64bit and macOS 10.14.6.

Flags: needinfo?(emil.ghitta)

Vlad, I'm confused by comment 17. This fix was made on esr68 not esr60?

Flags: needinfo?(vlad.lucaci)

Hello Julien,

Re-verified and confirming this as verified fixed on 68.1.0esr(Build ID:20190826132627) on Windows 10 64bit, Ubuntu 16.04 64bit and macOS 10.14.6.

Sorry for the confusion.

Flags: needinfo?(vlad.lucaci)
Flags: qe-verify+
Regressions: 1579418
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: