Add pref that disables loading any extensions without MPC=true

RESOLVED FIXED in Firefox 55

Status

()

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: aswan, Assigned: aswan)

Tracking

Trunk
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment)

Comment hidden (empty)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
(Assignee)

Updated

2 years ago
Attachment #8857759 - Flags: review?(dtownsend)
(Assignee)

Comment 3

2 years ago
Mossop: full context for this is in bug 1352204.  The test feels a little light to me, if you have ideas about scenarios I may have overlooked, I'd be glad to add more tests.
(Assignee)

Comment 4

2 years ago
Mossop pointed out on IRC that appDisabled is stored in extensions.json and not generally recomputed when the browser starts, so without any further changes, when we flip the pref on Nightly this won't take effect for non-MPC extensions that are already installed.  Recomputing requires re-reading extensions.json which is expensive enough that we want to avoid it when it isn't necessary, but changing the schema version causes it to be rebuilt (which recomputes appDisabled).

I verified this manually by doing the following:
1. Install an old version of ghostery that is not marked MPC, it installs successfully.
2. Close the browser, edit profile/prefs.js to set extensions.allow-non-mpc-extensions to false, restart the browser, ghostery is not disabled.
3. Close the browser, increment DB_SCHEMA in XPIProvider.jsm, (clear the startup cache), restart the browser, ghostery is disabled.

So this should be good to go as-is, we'll need to increment DB_SCHEMA when we flip the pref as discussed in bug 1352204.

Comment 5

2 years ago
mozreview-review
Comment on attachment 8857759 [details]
Bug 1356027 Add pref to disable non-MPC extensions

https://reviewboard.mozilla.org/r/129732/#review133012

Looks good. A few things we could do to bulk out the test a little:

1. Also test an add-on that is mpc.
2. Test installing when the pref is not set.
3. Flip the pref back to false when the add-on is still installed and make sure it becomes disabled again.
Attachment #8857759 - Flags: review?(dtownsend) → review+
Comment hidden (mozreview-request)

Comment 7

2 years ago
Pushed by aswan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8987472ddb9f
Add pref to disable non-MPC extensions r=mossop

Comment 8

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8987472ddb9f
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox55: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.