Ever since the method checked for package exclusions in
1d7f1d205ee64fd2723877c1f296c592518e516d it only applied the check to updates,
not to fresh installs. It's not clear why it did so, I assume this to be an
oversight.
Change this to always run the exclusion check, otherwise exclusions might be
circumvented using PackageUpdateAction::prepareInstallation() with a
package+version combination that would regularly be excluded.
}
// validate exclusions
- if ($queueType == 'update') {
- $excludedPackages = $scheduler->getExcludedPackages();
-
- if (!empty($excludedPackages)) {
- return [
- 'template' => WCF::getTPL()->fetch(
- 'packageUpdateExcludedPackages',
- 'wcf',
- ['excludedPackages' => $excludedPackages]
- ),
- 'type' => 'conflict',
- ];
- }
+ $excludedPackages = $scheduler->getExcludedPackages();
+
+ if (!empty($excludedPackages)) {
+ return [
+ 'template' => WCF::getTPL()->fetch(
+ 'packageUpdateExcludedPackages',
+ 'wcf',
+ ['excludedPackages' => $excludedPackages]
+ ),
+ 'type' => 'conflict',
+ ];
}
$stack = $scheduler->getPackageInstallationStack();