mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-12-24 07:11:32 +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:
@@ -43,6 +43,7 @@ if (!isset($_SESSION['SESS_REMOTE_UA'])) {
|
|||||||
if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > $SESSION_LIFETIME)) {
|
if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > $SESSION_LIFETIME)) {
|
||||||
session_unset();
|
session_unset();
|
||||||
session_destroy();
|
session_destroy();
|
||||||
|
session_start();
|
||||||
// After destroying session, we need to reset the User-Agent for the new session
|
// After destroying session, we need to reset the User-Agent for the new session
|
||||||
$_SESSION['SESS_REMOTE_UA'] = $_SERVER['HTTP_USER_AGENT'];
|
$_SESSION['SESS_REMOTE_UA'] = $_SERVER['HTTP_USER_AGENT'];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user