From 2ee2504e5611ebaf4e60da9dfafcd34c4c09cd6a Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Mon, 21 Sep 2026 15:45:16 +0100 Subject: [PATCH] should not need to pass in false here, as the init_session should have written mfa_complete to true etc --- public/login-mfa.php | 4 ++-- public/users/login-mfa.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/login-mfa.php b/public/login-mfa.php index 81b1287b..85cd6579 100644 --- a/public/login-mfa.php +++ b/public/login-mfa.php @@ -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']); } diff --git a/public/users/login-mfa.php b/public/users/login-mfa.php index 4bc7bc8c..723a2ee2 100644 --- a/public/users/login-mfa.php +++ b/public/users/login-mfa.php @@ -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']); } }