diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-02-17 16:19:05 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 12:45:31 +0200 |
commit | 10c4e73e561d2fc0d5f63b7e7787f4a36c76fc7c (patch) | |
tree | b9608043bbbcc0d666aa74a37e1267d5c0793636 /toolkit | |
parent | c9fd86cb784b81ab30461b773667b7251347fae6 (diff) | |
download | UXP-10c4e73e561d2fc0d5f63b7e7787f4a36c76fc7c.tar UXP-10c4e73e561d2fc0d5f63b7e7787f4a36c76fc7c.tar.gz UXP-10c4e73e561d2fc0d5f63b7e7787f4a36c76fc7c.tar.lz UXP-10c4e73e561d2fc0d5f63b7e7787f4a36c76fc7c.tar.xz UXP-10c4e73e561d2fc0d5f63b7e7787f4a36c76fc7c.zip |
Issue #1446 - Only match extension add-on types for target applications.
This resolves #1446
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/mozapps/extensions/internal/XPIProvider.jsm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index 2f298a934..d12e1de59 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. |