1
0
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:
copilot-swe-agent[bot]
2025-12-12 15:51:56 +00:00
parent 3e5a58be8f
commit 19225b223c
4 changed files with 3695 additions and 3685 deletions

View File

@@ -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();
}