mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-12-22 22:31:40 +00:00
Fix User-Agent validation error after session expiry and regeneration
Co-authored-by: DerLinkman <62480600+DerLinkman@users.noreply.github.com>
This commit is contained in:
@@ -50,6 +50,8 @@ if (isset($_POST["login_user"]) && isset($_POST["pass_user"])) {
|
||||
session_regenerate_id(true);
|
||||
$_SESSION['mailcow_cc_username'] = $login_user;
|
||||
$_SESSION['mailcow_cc_role'] = "admin";
|
||||
// Update User-Agent after session regeneration to prevent validation errors
|
||||
$_SESSION['SESS_REMOTE_UA'] = $_SERVER['HTTP_USER_AGENT'];
|
||||
header("Location: /admin/dashboard");
|
||||
die();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user