Closed Bug 1525125 Opened 6 years ago Closed 6 years ago

block newtab and homepage overrides in private windows

Categories

(WebExtensions :: General, enhancement, P1)

enhancement

Tracking

(firefox67 verified)

VERIFIED FIXED
mozilla67
Tracking Status
firefox67 --- verified

People

(Reporter: mixedpuppy, Assigned: mixedpuppy)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

We need to do one of:

  • disable newtab if the extension doesn't have pb access

or

  • ignore extension settings in pb if they do not have private access

The first is probably easiest since we can do this in one place when loading extensions. The second would be more flexible, allowing the setting to work in normal windows.

Flags: needinfo?(mconca)

Just to be clear, if an extension doesn't have pb access, the first option disables the new tab override in pb and normal windows, correct?

If so, I'm not sure that is a viable option. By default, extensions are installed without pb access, so if a user installs an extension that overrides the new tab, and then opens a (normal) new tab, they won't see anything (other than Firefox's default new tab). There is no indication they need to go to about:addons and enable the extension in pb mode in order to see the new tab in normal windows, and it is not intuitive.

I think we need to explore the second option.

Flags: needinfo?(mconca)
Summary: block chrome_url_overrides.newtab in private windows → block newtab and homepage overrides in private windows
Blocks: 1525428

(In reply to Mike Conca [:mconca] from comment #1)

I think we need to explore the second option.

fyi the second option is implemented in the patch.

No longer blocks: 1525428
Assignee: nobody → mixedpuppy
Priority: -- → P1
Pushed by scaraveo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/14f7c02566c2 block newtab and homepage overrides in private windows r=rpl,Gijs

Backed out changeset 14f7c02566c2 (Bug 1525125) for browser_ext_windows_create_tabId.js failures.

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=linux%2Cx64%2Copt%2Cmochitests%2Cwith%2Ce10s%2Ctest-linux64%2Fopt-mochitest-browser-chrome-e10s-3%2Cm-e10s%28bc3%29&tochange=5e8d2e49bb8c705a8f32d3a20fdfbd874624dc4b&fromchange=9a3d155d6e41743ee32331a226b8466c4748da04&selectedJob=228413913

Backout link: https://hg.mozilla.org/integration/autoland/rev/39bb681343d6f429ced7ea706649e48890d27c28

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=228413913&repo=autoland&lineNumber=4769

[task 2019-02-14T15:18:38.055Z] 15:18:38 INFO - loadManifestFromWebManifest@resource://gre/modules/addons/XPIInstall.jsm:388:19
[task 2019-02-14T15:18:38.056Z] 15:18:38 INFO - asyncloadManifest@resource://gre/modules/addons/XPIInstall.jsm:536:19
[task 2019-02-14T15:18:38.058Z] 15:18:38 INFO - async
loadManifestFromFile@resource://gre/modules/addons/XPIInstall.jsm:599:23
[task 2019-02-14T15:18:38.060Z] 15:18:38 INFO - asyncsyncLoadManifestFromFile@resource://gre/modules/addons/XPIInstall.jsm:611:35
[task 2019-02-14T15:18:38.061Z] 15:18:38 INFO - addMetadata@resource://gre/modules/addons/XPIDatabase.jsm:2349:32
[task 2019-02-14T15:18:38.063Z] 15:18:38 INFO - processFileChanges@resource://gre/modules/addons/XPIDatabase.jsm:2719:26
[task 2019-02-14T15:18:38.064Z] 15:18:38 INFO - checkForChanges@resource://gre/modules/addons/XPIProvider.jsm:2640:55
[task 2019-02-14T15:18:38.066Z] 15:18:38 INFO - startup@resource://gre/modules/addons/XPIProvider.jsm:2224:12
[task 2019-02-14T15:18:38.067Z] 15:18:38 INFO - callProvider@resource://gre/modules/AddonManager.jsm:204:31
[task 2019-02-14T15:18:38.069Z] 15:18:38 INFO - _startProvider@resource://gre/modules/AddonManager.jsm:653:5
[task 2019-02-14T15:18:38.070Z] 15:18:38 INFO - startup@resource://gre/modules/AddonManager.jsm:806:14
[task 2019-02-14T15:18:38.072Z] 15:18:38 INFO - startup@resource://gre/modules/AddonManager.jsm:2794:26
[task 2019-02-14T15:18:38.074Z] 15:18:38 INFO - observe@jar:file:///builds/worker/workspace/build/application/firefox/omni.ja!/components/addonManager.js:66:29
[task 2019-02-14T15:18:38.075Z] 15:18:38 INFO -
[task 2019-02-14T15:18:38.077Z] 15:18:38 INFO - Buffered messages finished
[task 2019-02-14T15:18:38.079Z] 15:18:38 INFO - TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_windows_create_tabId.js | Error: An unexpected error occurred :: Async
background@moz-extension://8cc6178e-b468-427b-9f43-fba62ab0702d/%7B11b466e1-a347-4fb3-a81e-8f22ae1f296c%7D.js:23:20
[task 2019-02-14T15:18:38.081Z] 15:18:38 INFO - async*@moz-extension://8cc6178e-b468-427b-9f43-fba62ab0702d/%7B11b466e1-a347-4fb3-a81e-8f22ae1f296c%7D.js:122:5
[task 2019-02-14T15:18:38.083Z] 15:18:38 INFO - -
[task 2019-02-14T15:18:38.084Z] 15:18:38 INFO - Stack trace:
[task 2019-02-14T15:18:38.086Z] 15:18:38 INFO - chrome://mochikit/content/browser-test.js:test_ok:1304
[task 2019-02-14T15:18:38.088Z] 15:18:38 INFO - chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js:testHandler:63
[task 2019-02-14T15:18:38.090Z] 15:18:38 INFO - chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js:testResult:73
[task 2019-02-14T15:18:38.092Z] 15:18:38 INFO - chrome://mochikit/content/tests/SimpleTest/specialpowersAPI.js:listener:2096
[task 2019-02-14T15:18:38.093Z] 15:18:38 INFO - chrome://mochikit/content/tests/SimpleTest/specialpowersAPI.js:loadExtension/<:2029
[task 2019-02-14T15:18:38.095Z] 15:18:38 INFO - chrome://mochikit/content/tests/SimpleTest/ChromePowers.js:ChromePowers.prototype._sendReply:33
[task 2019-02-14T15:18:38.097Z] 15:18:38 INFO - chrome://mochikit/content/tests/SimpleTest/SpecialPowersObserverAPI.js:resultListener:582
[task 2019-02-14T15:18:38.098Z] 15:18:38 INFO - resource://gre/modules/ExtensionCommon.jsm:emit:310
[task 2019-02-14T15:18:38.100Z] 15:18:38 INFO - resource://gre/modules/Extension.jsm:receiveMessage:1530
[task 2019-02-14T15:18:38.102Z] 15:18:38 INFO - MessageListener.receiveMessageresource://gre/modules/Extension.jsm:Extension:1386
[task 2019-02-14T15:18:38.055Z] 15:18:38 INFO - loadManifestFromWebManifest@resource://gre/modules/addons/XPIInstall.jsm:388:19
[task 2019-02-14T15:18:38.056Z] 15:18:38 INFO - async
loadManifest@resource://gre/modules/addons/XPIInstall.jsm:536:19
[task 2019-02-14T15:18:38.058Z] 15:18:38 INFO - asyncloadManifestFromFile@resource://gre/modules/addons/XPIInstall.jsm:599:23
[task 2019-02-14T15:18:38.060Z] 15:18:38 INFO - async
syncLoadManifestFromFile@resource://gre/modules/addons/XPIInstall.jsm:611:35
[task 2019-02-14T15:18:38.061Z] 15:18:38 INFO - addMetadata@resource://gre/modules/addons/XPIDatabase.jsm:2349:32
[task 2019-02-14T15:18:38.063Z] 15:18:38 INFO - processFileChanges@resource://gre/modules/addons/XPIDatabase.jsm:2719:26
[task 2019-02-14T15:18:38.064Z] 15:18:38 INFO - checkForChanges@resource://gre/modules/addons/XPIProvider.jsm:2640:55
[task 2019-02-14T15:18:38.066Z] 15:18:38 INFO - startup@resource://gre/modules/addons/XPIProvider.jsm:2224:12
[task 2019-02-14T15:18:38.067Z] 15:18:38 INFO - callProvider@resource://gre/modules/AddonManager.jsm:204:31
[task 2019-02-14T15:18:38.069Z] 15:18:38 INFO - _startProvider@resource://gre/modules/AddonManager.jsm:653:5
[task 2019-02-14T15:18:38.070Z] 15:18:38 INFO - startup@resource://gre/modules/AddonManager.jsm:806:14
[task 2019-02-14T15:18:38.072Z] 15:18:38 INFO - startup@resource://gre/modules/AddonManager.jsm:2794:26
[task 2019-02-14T15:18:38.074Z] 15:18:38 INFO - observe@jar:file:///builds/worker/workspace/build/application/firefox/omni.ja!/components/addonManager.js:66:29
[task 2019-02-14T15:18:38.075Z] 15:18:38 INFO -
[task 2019-02-14T15:18:38.077Z] 15:18:38 INFO - Buffered messages finished
[task 2019-02-14T15:18:38.079Z] 15:18:38 INFO - TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_windows_create_tabId.js | Error: An unexpected error occurred :: Asyncbackground@moz-extension://8cc6178e-b468-427b-9f43-fba62ab0702d/%7B11b466e1-a347-4fb3-a81e-8f22ae1f296c%7D.js:23:20
[task 2019-02-14T15:18:38.081Z] 15:18:38 INFO - async
@moz-extension://8cc6178e-b468-427b-9f43-fba62ab0702d/%7B11b466e1-a347-4fb3-a81e-8f22ae1f296c%7D.js:122:5
[task 2019-02-14T15:18:38.083Z] 15:18:38 INFO - -
[task 2019-02-14T15:18:38.084Z] 15:18:38 INFO - Stack trace:
[task 2019-02-14T15:18:38.086Z] 15:18:38 INFO - chrome://mochikit/content/browser-test.js:test_ok:1304
[task 2019-02-14T15:18:38.088Z] 15:18:38 INFO - chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js:testHandler:63
[task 2019-02-14T15:18:38.090Z] 15:18:38 INFO - chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js:testResult:73
[task 2019-02-14T15:18:38.092Z] 15:18:38 INFO - chrome://mochikit/content/tests/SimpleTest/specialpowersAPI.js:listener:2096
[task 2019-02-14T15:18:38.093Z] 15:18:38 INFO - chrome://mochikit/content/tests/SimpleTest/specialpowersAPI.js:loadExtension/<:2029
[task 2019-02-14T15:18:38.095Z] 15:18:38 INFO - chrome://mochikit/content/tests/SimpleTest/ChromePowers.js:ChromePowers.prototype._sendReply:33
[task 2019-02-14T15:18:38.097Z] 15:18:38 INFO - chrome://mochikit/content/tests/SimpleTest/SpecialPowersObserverAPI.js:resultListener:582
[task 2019-02-14T15:18:38.098Z] 15:18:38 INFO - resource://gre/modules/ExtensionCommon.jsm:emit:310
[task 2019-02-14T15:18:38.100Z] 15:18:38 INFO - resource://gre/modules/Extension.jsm:receiveMessage:1530
[task 2019-02-14T15:18:38.102Z] 15:18:38 INFO - MessageListener.receiveMessage*resource://gre/modules/Extension.jsm:Extension:1386
[task 2019-02-14T15:18:38.283Z] 15:18:38 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_windows_create_tabId.js | Got the expected number of test tabs - Expected: 2, Actual: 2 -
[task 2019-02-14T15:18:39.081Z] 15:18:39 INFO - Waiting tabs move to new window to be attached
[task 2019-02-14T15:18:39.082Z] 15:18:39 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_windows_create_tabId.js | No webNavigation.onCompleted event should have been received - Expected: [], Actual: [] -
[task 2019-02-14T15:18:39.219Z] 15:18:39 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_windows_create_tabId.js | webNavigation-on-window-create-tabId -
[task 2019-02-14T15:18:39.220Z] 15:18:39 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_windows_create_tabId.js | test result correct -
[task 2019-02-14T15:18:39.242Z] 15:18:39 INFO - Leaving test bound testWebNavigationOnWindowCreateTabId
[task 2019-02-14T15:18:39.243Z] 15:18:39 INFO - Entering test bound testGetLastFocusedDoesNotLeakDuringTabAdoption
[task 2019-02-14T15:18:39.588Z] 15:18:39 INFO - Extension loaded
[task 2019-02-14T15:18:39.589Z] 15:18:39 INFO - Console message: Warning: attempting to write 36937 bytes to preference extensions.webextensions.uuids. This is bad for general performance and memory usage. Such an amount of data should rather be written to an external file. This preference will not be sent to any content processes.
[task 2019-02-14T15:18:40.057Z] 15:18:40 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_windows_create_tabId.js | Got the expected number of tabs from windows.getLastFocused - Expected: 1, Actual: 1 -
[task 2019-02-14T15:18:40.135Z] 15:18:40 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_windows_create_tabId.js | tab-adopted -
[task 2019-02-14T15:18:40.136Z] 15:18:40 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_windows_create_tabId.js | test result correct -
[task 2019-02-14T15:18:40.159Z] 15:18:40 INFO - Leaving test bound testGetLastFocusedDoesNotLeakDuringTabAdoption
[task 2019-02-14T15:18:40.167Z] 15:18:40 INFO - GECKO(6700) | MEMORY STAT | vsize 2576MB | residentFast 759MB | heapAllocated 374MB
[task 2019-02-14T15:18:40.169Z] 15:18:40 INFO - TEST-OK | browser/components/extensions/test/browser/browser_ext_windows_create_tabId.js | took 3864ms
[task 2019-02-14T15:18:40.192Z] 15:18:40 INFO - checking window state
[task 2019-02-14T15:18:40.193Z] 15:18:40 INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-02-14T15:18:40.195Z] 15:18:40 INFO - TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_windows_create_tabId.js | Found an unexpected browser window at the end of test run -
[task 2019-02-14T15:18:40.196Z] 15:18:40 INFO - GECKO(6700) | must wait for focus
[task 2019-02-14T15:18:40.285Z] 15:18:40 INFO - TEST-START | browser/components/extensions/test/browser/browser_ext_windows_create_url.js
[task 2019-02-14T15:18:42.921Z] 15:18:42 INFO - GECKO(6700) | MEMORY STAT | vsize 2560MB | residentFast 739MB | heapAllocated 366MB
[task 2019-02-14T15:18:42.924Z] 15:18:42 INFO - TEST-OK | browser/components/extensions/test/browser/browser_ext_windows_create_url.js | took 2636ms

Flags: needinfo?(mixedpuppy)
Pushed by dvarga@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/10528ad0d7a1 block newtab and homepage overrides in private windows r=rpl,Gijs
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Backout by rmaries@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/57ab0251343c Backed out changeset 10528ad0d7a1 for frequently failing bug 1528134. a=backout
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Pushed by scaraveo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ae77c4cd9a28 block newtab and homepage overrides in private windows r=rpl,Gijs
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Flags: needinfo?(mixedpuppy)
Depends on: 1527909
Depends on: 1528134
Attached video 2019-02-21_14h39_01.mp4 (deleted) —

This issue is verified as fixed on Firefox 67.0a1(20190220040540) under Win 7 64-bit and Mac OS X 10.13.6.

The new tab moz-extension url and homepage moz-extension url works as expected in PB.

We have a corner case when an extension which is not allowed on PB is still allowed to set a non-extension url as the homepage.

"chrome_settings_overrides": {
"homepage": "https://youtube.com/"
}

Please see the attached video.

Shane do you want me to file another bug for the corner case?

Flags: needinfo?(mixedpuppy)
Status: RESOLVED → VERIFIED

Shane do you want me to file another bug for the corner case?

Sure. I'm not convinced we want to worry about it, but we can think that through later.

Flags: needinfo?(mixedpuppy)
Depends on: 1529582
Depends on: 1530168
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: