Skip to content
Snippets Groups Projects
Verified Commit cf7ea8e7 authored by Matthew Finkel's avatar Matthew Finkel Committed by Pier Angelo Vendrame
Browse files

Bug 41598: Prevent NoScript from being removed/disabled.

Bug 40253: Explicitly allow NoScript in Private Browsing mode.
parent 510ce421
No related branches found
No related tags found
1 merge request!735Bug 42033: Rebased release onto 102.15.0esr (last 102.x release!)
......@@ -2954,6 +2954,15 @@ class Extension extends ExtensionData {
this.permissions.add(PRIVATE_ALLOWED_PERMISSION);
}
// Bug 40253: Explicitly allow NoScript in Private Browsing mode.
if (this.id === "{73a6fe31-595d-460b-a920-fcc0f8843232}") {
ExtensionPermissions.add(this.id, {
permissions: [PRIVATE_ALLOWED_PERMISSION],
origins: [],
});
this.permissions.add(PRIVATE_ALLOWED_PERMISSION);
}
// We only want to update the SVG_CONTEXT_PROPERTIES_PERMISSION during install and
// upgrade/downgrade startups.
if (INSTALL_AND_UPDATE_STARTUP_REASONS.has(this.startupReason)) {
......
......@@ -854,6 +854,15 @@ class AddonInternal {
}
}
// Bug 41598: prevent NoScript from being uninstalled/disabled
if (this.id === "{73a6fe31-595d-460b-a920-fcc0f8843232}") {
permissions &= ~(
AddonManager.PERM_CAN_UNINSTALL |
AddonManager.PERM_CAN_DISABLE |
AddonManager.PERM_CAN_CHANGE_PRIVATEBROWSING_ACCESS
);
}
return permissions;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment