From db8019bb7d923bfdb72dc70f129ae18f5e0706d9 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 68a965df..f6de40a4 100644 --- a/public/login-mfa.php +++ b/public/login-mfa.php @@ -46,14 +46,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 f2d5a25a..993c8de0 100644 --- a/public/users/login-mfa.php +++ b/public/users/login-mfa.php @@ -39,7 +39,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']); } }