Pass add-on id/type/version through to AddonManager.getInstallForURL when known
Categories
(Toolkit :: Add-ons Manager, enhancement, P2)
Tracking
()
People
(Reporter: kzar, Assigned: kzar)
References
Details
(Whiteboard: [addons-jira] )
Attachments
(9 external files)
We are working to harden AddonManager.getInstallForURL to enforce the add-on id, type and/or version when provided. Once that work's finished, we should go through and check the callsites, and update them to pass through those details through when known.
Updated•1 month ago
|
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Take care to pass the expected id/type/version when installing recommended and
builtin add-ons.
Testing:
ADB extension:
- Launch Firefox
./mach run --temp-profile -- about:debugging#/setup - Click "Enable USB Devices"
- Ensure "USB Enabled" is displayed after the add-on is installed.
Recommended:
- Launch Firefox
./mach run --temp-profile -- about:addons - Click to install one of the listed recommended add-ons.
- Likewise for one of the recommended themes.
- Ensure they were both installed successfully.
| Assignee | ||
Comment 2•1 month ago
|
||
Take care to pass the expected id/type/version when installing locales and
dictionaries. Also fix a bug so that telemetryInfo.source is passed correctly
when installing locales.
Testing:
- Launch the browser with language packs available:
./mach run --temp-profile \
--setpref browser.settings-redesign.enabled=true \
--setpref intl.multilingual.enabled=true \
--setpref intl.multilingual.downloadEnabled=true \
--setpref extensions.checkCompatibility.nightly=false \
--setpref 'extensions.getAddons.langpacks.url=https://services.addons.mozilla.org/api/v4/addons/language-tools/?app=firefox&type=language&appversion=158.0' \
-- 'about:preferences#languages'
- Click the "Preferred language" drop-down
(if no options are listed, wait a few seconds and try again.) - Select a different language (e.g. German), then click "Apply and Restart".
- Ensure your language was updated after the browser restarts.
- Navigate to
about:addons, then make sure both the language pack and
dictionary are listed and enabled for the language you picked.
| Assignee | ||
Comment 3•1 month ago
|
||
Testing:
- Launch Firefox:
./mach run --temp-profile -- about:addons - Click the "Install" button by one of the listed themes.
- Ensure the theme is installed and activated successfully.
| Assignee | ||
Comment 4•1 month ago
|
||
Testing:
Importing:
- Install Dark Reader extension[1] in Google Chrome.
- Quit Chrome.
- Run Firefox:
./mach run --temp-profile -- 'about:preferences#general-migrate' - Select Chrome, and click the "Import" button.
- Ensure at least one extension is imported. Click "Done".
- Navigate to
about:addons#extensionsand click "Install Extensions" to
finalise the installation of the imported extension(s).
Sync:
- Ensure your main Firefox profile has at least one extension installed, and
you are logged in for sync. - Run Firefox:
./mach run --temp-profile. - Click the hamburger menu, and then "Sign in" by "Sync and Save Data".
- Sign in to your account.
- Ensure your extensions are automatically installed.
1 - https://chromewebstore.google.com/detail/dark-reader/eimadpbcbfnmbkopoojfekhnkhdbieeh
| Assignee | ||
Comment 5•1 month ago
|
||
Provide the add-on type and version for add-ons that are being installed via
enterprise policies, if known. While we're at it, let's refactor
PoliciesHelpers.installAddonFromURL() slightly, to make the parameter names
and structure more closely follow the conventions of related add-on installation
code (e.g. AddonManager.getInstallForURL()).
Testing:
- Write this policy.json file somewhere on disk:
{
"policies": {
"ExtensionSettings": {
"addon@darkreader.org": {
"installation_mode": "force_installed"
}
}
}
}
- Launch Firefox with that policy:
./mach run --temp-profile \
--setpref browser.policies.alternatePath=/PATH/TO/policy.json \
-- about:addons
- Check that the Dark Reader extension was installed successfully.
| Assignee | ||
Comment 6•1 month ago
|
||
By the way Toby, it might also be worth filing a follow-up to similarly update any other AddonManager.getInstallForURL() callsites in Thunderbird? Luca pointed out there could be a couple worth updating.
Comment 9•29 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/1a3c115b0d3f
https://hg.mozilla.org/mozilla-central/rev/fd13ceb5ac0b
https://hg.mozilla.org/mozilla-central/rev/e5d4443caca8
https://hg.mozilla.org/mozilla-central/rev/9a0acd35eab7
https://hg.mozilla.org/mozilla-central/rev/245934a9075d
Updated•22 days ago
|
Comment 10•6 days ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D333214
Updated•6 days ago
|
Comment 11•6 days ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D333215
Updated•6 days ago
|
Comment 12•6 days ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D333216
Updated•6 days ago
|
Comment 13•6 days ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D333217
Updated•6 days ago
|
Comment 14•6 days ago
|
||
firefox-esr153 Uplift Approval Request
- User impact if declined/Reason for urgency: Security hardening
- Code covered by automated testing?: yes
- Fix verified in Nightly?: no
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: Adds extra validation for scenarios that are not supported. Covered by automated tests.
- String changes made/needed?: none; "Is Android affected?" is No because ESR153 is desktop-only (bug 2059764).
- Is Android affected?: no
Comment 15•6 days ago
|
||
Note the above uplift request excludes the last patch of the stack (D333218) because there was a merge conflict on ESR153 that was not too trivial to resolve. The patch (D333218) is merely a refactor without behavioral changes (there was already pre-existing logic doing the same) so I opted for excluding it for simplicity.
Updated•6 days ago
|
Updated•6 days ago
|
Updated•6 days ago
|
Updated•6 days ago
|
Updated•6 days ago
|
Comment 16•6 days ago
|
||
| uplift | ||
Updated•3 days ago
|
Description
•