Fix disabling of session ACP expiration in debug + dev mode
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 20 Jan 2021 16:05:15 +0000 (17:05 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 20 Jan 2021 16:05:15 +0000 (17:05 +0100)
While this was properly accounted for in SessionHandler::prune() it was not
when loading the session.

wcfsetup/install/files/lib/system/session/SessionHandler.class.php

index 4b66a5d232138ed81ec06ad068a7c0232c933058..14b87424860593c74bd964ee781d5f0b436385c9 100644 (file)
@@ -576,7 +576,9 @@ final class SessionHandler extends SingletonFactory {
                        ($row['userID'] ? self::USER_SESSION_LIFETIME :
                        (                 self::GUEST_SESSION_LIFETIME)));
                if ($row['lastActivityTime'] < (TIME_NOW - $lifetime)) {
-                       return false;
+                       if (!$this->isACP || !ENABLE_DEBUG_MODE || !ENABLE_DEVELOPER_TOOLS) {
+                               return false;
+                       }
                }
                
                $variables = @\unserialize($row['sessionVariables']);