Closed Bug 1757366 Opened 3 years ago Closed 1 year ago

Can't disable eBay one-off search with "browser.search.hiddenOneOffs" preference in policies.json

Categories

(Firefox :: Enterprise Policies, defect, P3)

Firefox 97
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: harrison.boltz, Unassigned)

References

Details

Attachments

(1 file)

Attached file policies.json

Steps to reproduce:

Within a fresh Windows 10 21H2 x64 environment, install Firefox 97.0.1 x64 via the msi installer. After installation, create a distribution folder in the installation directory (C:\Program Files\Mozilla Firefox). Copy the attached policies.json into the newly created distribution folder.

Actual results:

Upon opening Firefox, the eBay one-off search appears to be disabled. The "browser.search.hiddenOneOffs" preference is properly populated as set by policies.json. Clicking on the address bar will not show the eBay one-off, and it is shown as disabled in about:preferences. Once the address bar has been interacted with, or Firefox has been restarted, the eBay one-off search is re-enabled, and the "browser.search.hiddenOneOffs" preference is cleared of its eBay entry. This behavior is only with eBay, and does not occur when disabling it manually via about:config or about:preferences, only policies.json.

Expected results:

The eBay one-off search should remain disabled like the other search engines.

The Bugbug bot thinks this bug should belong to the 'Firefox::Installer' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Installer
Component: Installer → Enterprise Policies

The severity field is not set for this bug.
:mkaply, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mozilla)

I'm not seeing this behavior. Are you located in the US? I'm wondering if it's locale related.

Did you try locking the preference?

Flags: needinfo?(mozilla)

(In reply to Mike Kaply [:mkaply] from comment #3)

I'm not seeing this behavior. Are you located in the US? I'm wondering if it's locale related.

Did you try locking the preference?

I am located in the US.

Since reporting this bug, I have switched to using an AutoConfig setup to set preferences (for unrelated reasons), and it has the same behavior.
Here is what I have found in my testing:

When trying to remove eBay via my firefox.cfg file:
If I use defaultPref("browser.search.hiddenOneOffs", "Amazon.com,Bing,DuckDuckGo,eBay,Google,Wikipedia (en)"):
eBay is never disabled.

If I use lockPref("browser.search.hiddenOneOffs", "Amazon.com,Bing,DuckDuckGo,eBay,Google,Wikipedia (en)"):
eBay is disabled, but the preference is locked, so end users cannot make further changes.

If I use pref("browser.search.hiddenOneOffs", "Amazon.com,Bing,DuckDuckGo,eBay,Google,Wikipedia (en)"):
eBay is not disabled on first launch, but after one browser restart, it is disabled.

The severity field is not set for this bug.
:mkaply, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mozilla)

I can confirm this. It only happens with a new profile. the oneOffs pref is overwritten with a new value.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(mozilla)
Priority: -- → P3

I can't think of any clever way to solve this. Changing the code involved breaks other things.

The issue is that eBay is added dynamically at startup based on your locale, so we end up going through this code:

https://searchfox.org/mozilla-central/rev/efc480f2188fb43c9cccdfd2eef79749a19c20a3/browser/components/BrowserGlue.jsm#1156

which sets the hiddenOneOffs to remove eBay (since it's a new engine).

Seeing if Standard8 has any clever ideas.

Flags: needinfo?(standard8)

In bug 1643887 comment 4, I've been pondering reworking the pref info a flag on the actual search engine object (similar to how we remove/hide the app provided engines). I've been holding off on that change because of other potential work that might end up making it redundant, however, it would solve both this bug and that one.

Flags: needinfo?(standard8)
Depends on: 1643887

Mark, before I try to reproduce, do you think this is fixed by bug 1643887?

Flags: needinfo?(standard8)

I'd forgotten about this one. Bug 1643887 removed support for the preference (we'll migrate it, but that won't work here). The information is now stored alongside the rest of the search storage.

If we want to continue supporting this functionality, then we could set the hideOneOffButton attribute after startup like we do for the other search settings.

Flags: needinfo?(standard8)

We still have this listed as a search preference:

https://firefox-source-docs.mozilla.org/browser/search/Preferences.html

So you're saying we migrate this once and never again?

I'm not sure what to do here.

Do we have a pref for not showing all of the oneoffs?

(In reply to Mike Kaply [:mkaply] from comment #11)

We still have this listed as a search preference:

https://firefox-source-docs.mozilla.org/browser/search/Preferences.html

Yeah, unfortunately we missed cleaning everything up. I'll file a patch in a bit to remove that.

So you're saying we migrate this once and never again?

Correct, and it'll also require the existing engines to be present in the settings, so this isn't something that policies could adjust.

I'm not sure what to do here.

Do we have a pref for not showing all of the oneoffs?

We do not.

The search team has talked about reworking how some of the enabling/disabling works, but we haven't come to any conclusions yet. About the best thing we could do is to add something onto this section that uses the hideOneOffButton attribute.

I think the question is though, what is the desired outcome? Is it simply to not show the one-offs, or is it to remove a selection of engines from the one-offs?

If it is a selection, then I'd ask why removing the search engine isn't good enough.

If it is removing all of the one-offs, then maybe we should add an option for that, though I don't see why an enterprise would feel the need to enforce that on their users, especially when these days we have useful options like bookmarks/tabs/history filtering.

If it is removing all of the one-offs, then maybe we should add an option for that, though I don't see why an enterprise would feel the need to enforce that on their users, especially when these days we have useful options like bookmarks/tabs/history filtering.

Agreed. Removing individual doesn't make a lot of sense.

Harrison, what was your goal? Just removing all the one offs?

Flags: needinfo?(harrison.boltz)

Redirect a needinfo that is pending on an inactive user to the triage owner.
:mkaply, since the bug has recent activity, could you please find another way to get the information or close the bug as INCOMPLETE if it is not actionable?

For more information, please visit BugBot documentation.

Flags: needinfo?(harrison.boltz) → needinfo?(mozilla)

Closing as wontfix

Status: NEW → RESOLVED
Closed: 1 year ago
Flags: needinfo?(mozilla)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: