From: Tim Düsterhus Date: Wed, 5 May 2021 11:27:23 +0000 (+0200) Subject: Fix setting of the long-lived cookie after login X-Git-Tag: 5.4.0_Alpha_1^0 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=753316948e278ae8b6a3d4f3f4fcb05934dafcb6;p=GitHub%2FWoltLab%2FWCF.git Fix setting of the long-lived cookie after login --- diff --git a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php index b1a744ed80..f54eb30d56 100644 --- a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php @@ -1067,6 +1067,13 @@ final class SessionHandler extends SingletonFactory if (!$hasSession) { throw new \LogicException('Unreachable'); } + + // Replace the session-lived cookie by a long-lived cookie. + HeaderUtil::setCookie( + 'user_session', + $this->getCookieValue(), + TIME_NOW + (self::USER_SESSION_LIFETIME * 2) + ); } }