diff options
author | Moonchild <moonchild@palemoon.org> | 2020-07-12 01:34:51 +0200 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-07-12 01:34:51 +0200 |
commit | 84caa4f3ad6d8257eb618e28d30f3ea8c1cfef6f (patch) | |
tree | 6bfef511260e1f123465dabed42b3e659c77189d | |
parent | 4f44e23c1607302a366df40dcfc26cc548444407 (diff) | |
download | UXP-84caa4f3ad6d8257eb618e28d30f3ea8c1cfef6f.tar UXP-84caa4f3ad6d8257eb618e28d30f3ea8c1cfef6f.tar.gz UXP-84caa4f3ad6d8257eb618e28d30f3ea8c1cfef6f.tar.lz UXP-84caa4f3ad6d8257eb618e28d30f3ea8c1cfef6f.tar.xz UXP-84caa4f3ad6d8257eb618e28d30f3ea8c1cfef6f.zip |
Revert "Revert "Issue #1446 - Only match extension add-on types for target applications.""
This reverts commit b089b365d6b55948be49c7dbb5a11e9a6872d6a0.
-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. |