1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-12-13 18:06:01 +00:00

Fix session handling - explicitly start session after destroy

Co-authored-by: DerLinkman <62480600+DerLinkman@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-12 15:53:53 +00:00
parent 19225b223c
commit b3e6891802

View File

@@ -43,6 +43,7 @@ if (!isset($_SESSION['SESS_REMOTE_UA'])) {
if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > $SESSION_LIFETIME)) {
session_unset();
session_destroy();
session_start();
// After destroying session, we need to reset the User-Agent for the new session
$_SESSION['SESS_REMOTE_UA'] = $_SERVER['HTTP_USER_AGENT'];
}