From: Tim Düsterhus Date: Fri, 29 Sep 2023 14:25:09 +0000 (+0200) Subject: Expire the cached license data after 60 days X-Git-Tag: 6.0.0~29^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9fa3273f7d465ca5ce09f0e90c2702aca58bdb40;p=GitHub%2FWoltLab%2FWCF.git Expire the cached license data after 60 days --- diff --git a/wcfsetup/install/files/lib/bootstrap/com.woltlab.wcf.php b/wcfsetup/install/files/lib/bootstrap/com.woltlab.wcf.php index f610740049..5a3a558ee5 100644 --- a/wcfsetup/install/files/lib/bootstrap/com.woltlab.wcf.php +++ b/wcfsetup/install/files/lib/bootstrap/com.woltlab.wcf.php @@ -77,6 +77,11 @@ return static function (): void { if ($brandingFree !== '0.0' && $expiresAt >= \TIME_NOW) { define('WOLTLAB_BRANDING', false); } + + // Expire the cached license data after 60 days. + if ($licenseData->creationDate->getTimestamp() < \TIME_NOW - 86400 * 60) { + $licenseApi->clearLicenseFile(); + } } } catch (\Throwable) { // Reading the license file must never cause any errors.