From: Tim Düsterhus Date: Thu, 12 May 2022 12:32:23 +0000 (+0200) Subject: Remove `UPDATE_SERVER_TRUSTED_MIRROR` X-Git-Tag: 6.0.0_Alpha_1~1309^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6d87a4131796f628c39f3f5ec765618dfeae2f20;p=GitHub%2FWoltLab%2FWCF.git Remove `UPDATE_SERVER_TRUSTED_MIRROR` --- diff --git a/wcfsetup/install/files/lib/data/package/update/server/PackageUpdateServer.class.php b/wcfsetup/install/files/lib/data/package/update/server/PackageUpdateServer.class.php index a74b2349b2..831a6c1bb7 100644 --- a/wcfsetup/install/files/lib/data/package/update/server/PackageUpdateServer.class.php +++ b/wcfsetup/install/files/lib/data/package/update/server/PackageUpdateServer.class.php @@ -341,30 +341,13 @@ class PackageUpdateServer extends DatabaseObject * Returns true if this server is trusted and is therefore allowed to distribute * official updates for packages whose identifier starts with "com.woltlab.". * - * Internal mirrors in enterprise environments are supported through the optional - * PHP constant `UPDATE_SERVER_TRUSTED_MIRROR`, adding it to the `config.inc.php` - * of the Core is considered to be a safe practice. - * - * Example: - * define('UPDATE_SERVER_TRUSTED_MIRROR', 'mirror.example.com'); - * * @return bool */ final public function isTrustedServer() { $host = Url::parse($this->serverURL)['host']; - // the official server is always considered to be trusted - if ($host === 'update.woltlab.com') { - return true; - } - - // custom override to allow testing and mirrors in enterprise environments - if (\defined('UPDATE_SERVER_TRUSTED_MIRROR') && !empty(UPDATE_SERVER_TRUSTED_MIRROR) && $host === UPDATE_SERVER_TRUSTED_MIRROR) { - return true; - } - - return false; + return $host === 'update.woltlab.com'; } /**