Simplify the check for the trusted servers
authorAlexander Ebert <ebert@woltlab.com>
Thu, 7 Sep 2023 09:44:42 +0000 (11:44 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 7 Sep 2023 09:44:46 +0000 (11:44 +0200)
wcfsetup/install/files/lib/system/package/PackageUpdateUnauthorizedException.class.php

index 64d118d7eaf1b6cebcd592ecf776800d60ff1156..1c5f71622694503aec909cb1768147bc97cd9112 100644 (file)
@@ -63,12 +63,10 @@ class PackageUpdateUnauthorizedException extends UserException
         $authInsufficient = (($serverReply['httpHeaders']['wcf-update-server-auth'][0] ?? '') === 'unauthorized');
         if ($authInsufficient && !empty($this->packageUpdateVersion['pluginStoreFileID'])) {
             $hasOnlyTrustedServers = true;
-            if (!ENABLE_ENTERPRISE_MODE) {
-                foreach (PackageUpdateServer::getActiveUpdateServers() as $updateServer) {
-                    if (!$updateServer->isWoltLabUpdateServer() && !$updateServer->isWoltLabStoreServer()) {
-                        $hasOnlyTrustedServers = false;
-                        break;
-                    }
+            foreach (PackageUpdateServer::getActiveUpdateServers() as $updateServer) {
+                if (!$updateServer->isWoltLabUpdateServer() && !$updateServer->isWoltLabStoreServer()) {
+                    $hasOnlyTrustedServers = false;
+                    break;
                 }
             }