further fixups for homepage/newtab
Categories
(WebExtensions :: General, defect, P2)
Tracking
(firefox67 verified, firefox68 verified)
People
(Reporter: mixedpuppy, Assigned: mixedpuppy)
References
(Blocks 1 open bug)
Details
(Whiteboard: [qa-triaged])
Attachments
(3 files, 1 obsolete file)
47 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details | Review |
2.71 MB,
image/gif
|
Details | |
3.07 MB,
image/gif
|
Details |
Bug 1532110 is fixing a problem loading homepage when in PPB. There is still an edge case that was meant to be fixed by using ExtensionsSettingsStore, however that is not yet initialized on startup, though it only affects PPB.
Proposed solutions that may work:
-
sync init ExtensionSettingsStore when in PPB
-
use a second pref to mark the homepage_override as controlled by an extension with private permission. This quickly gets complicated as it would need to be updated when the private permission changes.
-
Never use homepage_override from any extension in PPB. We would still need a secondary pref to easily identify that it is extension controlled, however we would not need to know the extensions permissions.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Let's pursue option 1 (sync init) and see what the performance hit is for startup in PPB mode.
Assignee | ||
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
I'm still less than enthused by this, even if it only effects PPB. Asking around for any better idea.
Comment 4•5 years ago
|
||
Is it feasible to pretend that extensions without the private permission are disabled if perma-private browsing mode is enabled? E.g. by storing the state of the internal private browsing permission in startupData? And when an add-on is enabled while PPB is enabled, implicitly grant the internal private browsing permission to the extension?
Assignee | ||
Comment 5•5 years ago
|
||
(In reply to Rob Wu [:robwu] from comment #4)
Is it feasible to pretend that extensions without the private permission are disabled if perma-private browsing mode is enabled? E.g. by storing the state of the internal private browsing permission in startupData?
I thought startupData was loaded async. The homepage/newtab getters are synchronous and called very early. We also decided against putting the permission in startupData very early (in lieu of changing it to use ExtensionPermissions).
And when an add-on is enabled while PPB is enabled, implicitly grant the internal private browsing permission to the extension?
IIUC you're suggesting the extension automatically gets private access. We removed that on purpose.
Comment 6•5 years ago
|
||
The URL must be synchronously available, and the private browsing status is not synchronously available.
A way to resolve this (other than the many options that you already have) is to return a dummy URL that resolves when the extra extension data is ready. I.e. moz-extension-redirect://search-provider/
that may eventually resolve to moz-extension://UUID/
, about:home
or about:privatebrowsing
depending on the permission.
Or without introducing a new scheme/URL: return the moz-extension://
URL unconditionally (by the homepage getter) and let the protocol handler (ExtensionProtocolHandler
) redirect to about:privatebrowsing
if the private browsing permission is not available AND the requested URL is the same as the one in the chrome_settings_overrides.homepage
section of manifest.json
.
Assignee | ||
Comment 7•5 years ago
|
||
An extension can set the homepage to an http url, so relying on the extension protocol wont work in that case. We do not want to simply allow those urls to go through if the extension does not have private access.
Assignee | ||
Updated•5 years ago
|
Comment 8•5 years ago
|
||
As discussed on IRC, I think the current approach (synchronously reading settings in permanent private mode) is probably the best option.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 9•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 10•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6bf1760ee40d07359e253a42b7037d398a5fdd92
Assignee | ||
Comment 11•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=4887e54c180ea2ecf4ff56cdc8681a42c225b37b
Assignee | ||
Comment 12•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b36d656e19204d7bff423286c60a644f141564c4
Comment 13•5 years ago
|
||
Pushed by scaraveo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e8634d10ef03 use prefs to support extension newtab and homepage on startup. r=kmag
Comment 14•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Assignee | ||
Comment 15•5 years ago
|
||
Comment on attachment 9055212 [details]
Bug 1532165 use prefs to support extension newtab and homepage on startup.
Beta/Release Uplift Approval Request
- Feature/Bug causing the regression: Bug 1380809
- User impact if declined: An extension that does not have permission for private windows may still be able to set a homepage or newtab to an external url.
Also requires test fix from bug 1543538
- 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: install an extension that sets homepage to an http url
do not give private permission
set permanent private browsing, restart
you should not get the external url as a homepage - List of other uplifts needed: Bug 1543538
- Risk to taking this patch: Medium
- Why is the change risky/not risky? (and alternatives if risky): It is a larger change than prefered for uplifting at this point, but this does prevent setting a homepage for private browsing when the extension does not have permission.
- String changes made/needed: none
Assignee | ||
Updated•5 years ago
|
Comment 17•5 years ago
|
||
This issue is verified as fixed on Firefox 68.0a1 (20190414214746) under Win 7 64-bit and Mac OS X 10.14.1.
Please see the attached video.
Comment 18•5 years ago
|
||
Comment on attachment 9055212 [details]
Bug 1532165 use prefs to support extension newtab and homepage on startup.
Verified by QA on Nightly and has tests, approved for 67 beta 11. However, since this is a larger uplift than usual, if this causes new regressions in the rest of the beta cycle, we will back the patch out and let it ride the trains to 68. Thanks.
![]() |
||
Comment 19•5 years ago
|
||
bugherder uplift |
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 20•5 years ago
|
||
This issue is verified as fixed on Firefox 67.0b11 (20190415085659) under Win 7 64-bit and Mac OS X 10.14.1.
Please see the attached video.
Description
•