should not need to pass in false here, as the init_session should have written mfa_complete to true etc

This commit is contained in:
David Goodwin authored and Christian Boltz committed 2026-09-29 12:05:32 +00:00
1 parent 77ccefdbf2
commit 2ee2504e56
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -70,14 +70,14 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
init_session(authentication_get_username(false), true, true);
// get superadmin status and store in session
$h->init(authentication_get_username(false));
$h->init(authentication_get_username());
if ($h->result()['superadmin'] == 1) {
$_SESSION['sessid']['roles'][] = 'global-admin';
}
header("Location: main.php");
exit(0);
} else {
error_log("PostfixAdmin admin second factor login failed (username: " . authentication_get_username(false) . ", ip_address: {$_SERVER['REMOTE_ADDR']})");
error_log("PostfixAdmin admin second factor login failed (username: " . authentication_get_username(). ", ip_address: {$_SERVER['REMOTE_ADDR']})");
$error = $PALANG['pTotp_failed'];
flash_error($PALANG['pTotp_failed']);
}
+1 -1
View File
@@ -65,7 +65,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
header("Location: main.php");
exit(0);
} else { # $h->login failed
error_log("PostfixAdmin admin second factor login failed (username: " . authentication_get_username(false) . ", ip_address: {$_SERVER['REMOTE_ADDR']})");
error_log("PostfixAdmin admin second factor login failed (username: " . authentication_get_username() . ", ip_address: {$_SERVER['REMOTE_ADDR']})");
flash_error($PALANG['pTotp_failed']);
}
}