mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-03-17 20:58:31 +02:00
Destroy session when it becomes invalid
This commit is contained in:
parent
3ab77b1303
commit
49f28ecaf8
@ -54,5 +54,9 @@ function session_check() {
|
||||
return true;
|
||||
}
|
||||
if (isset($_SESSION['mailcow_cc_role']) && session_check() === false) {
|
||||
exit("Invalid session");
|
||||
session_regenerate_id(true);
|
||||
session_unset();
|
||||
session_destroy();
|
||||
session_write_close();
|
||||
header("Location: /");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user