Fix setting of the long-lived cookie after login 5.4.0_Alpha_1
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 5 May 2021 11:27:23 +0000 (13:27 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 5 May 2021 11:27:50 +0000 (13:27 +0200)
wcfsetup/install/files/lib/system/session/SessionHandler.class.php

index b1a744ed80e07807cccbb8d1e6cc3ec4c4800fe9..f54eb30d56866b2170bf498fdbff65efd5424cc7 100644 (file)
@@ -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)
+            );
         }
     }