From 753316948e278ae8b6a3d4f3f4fcb05934dafcb6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 5 May 2021 13:27:23 +0200 Subject: [PATCH] Fix setting of the long-lived cookie after login --- .../files/lib/system/session/SessionHandler.class.php | 7 +++++++ 1 file changed, 7 insertions(+) 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) + ); } } -- 2.20.1