summaryrefslogtreecommitdiff
path: root/toolkit/mozapps
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-02-17 16:19:05 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-02-17 16:19:05 +0100
commitc2778f8a0a7bad8a153ff64bd077176f9d9399c6 (patch)
tree94957f63b532f2eb57c7ee17a60deb7db5a857c2 /toolkit/mozapps
parentdd64bed11f2f55f6fe946f9f6a33804f885005c2 (diff)
downloaduxp-c2778f8a0a7bad8a153ff64bd077176f9d9399c6.tar.gz
Issue mcp-graveyard/UXP#1446 - Only match extension add-on types for target applications.
This resolves #1446
Diffstat (limited to 'toolkit/mozapps')
-rw-r--r--toolkit/mozapps/extensions/internal/XPIProvider.jsm15
1 files changed, 9 insertions, 6 deletions
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
index 2f298a9349..d12e1de59f 100644
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -6528,12 +6528,15 @@ AddonInternal.prototype = {
app = targetApp;
}
#ifdef MOZ_PHOENIX_EXTENSIONS
- //Special case: check for Firefox TargetApps. this has to be done AFTER
- //the initial check to make sure appinfo.ID is preferred, even if
- //Firefox is listed before it in the install manifest.
- for (let targetApp of this.targetApplications) {
- if (targetApp.id == FIREFOX_ID) //Firefox GUID
- return targetApp;
+ // Special case: check for Firefox TargetApps. this has to be done AFTER
+ // the initial check to make sure appinfo.ID is preferred, even if
+ // Firefox is listed before it in the install manifest.
+ // Only do this for extensions. Other types should not be allowed.
+ if (this.type == "extension") {
+ for (let targetApp of this.targetApplications) {
+ if (targetApp.id == FIREFOX_ID) //Firefox GUID
+ return targetApp;
+ }
}
#endif
// Return toolkit ID if toolkit.