From 965b2418eeeb0d29dad8cbc4081316e925eebae3 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Fri, 21 Oct 2022 10:31:17 +0200 Subject: [PATCH] authenticate_user: pass undef instead of empty $tfa_challenge to authenticate_2nd_new just above, we check & return if $tfa_challenge is set, so there is no way that it would be set here. To make it clearer that it must be undef here pass it as such. Signed-off-by: Dominik Csapak --- src/PVE/AccessControl.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/AccessControl.pm b/src/PVE/AccessControl.pm index 3d77bed..5addcbf 100644 --- a/src/PVE/AccessControl.pm +++ b/src/PVE/AccessControl.pm @@ -746,7 +746,7 @@ sub authenticate_user : prototype($$$$;$) { if ($new_format) { # This is the first factor with an optional immediate 2nd factor for TOTP: - my $tfa_challenge = authenticate_2nd_new($username, $realm, $otp, $tfa_challenge); + my $tfa_challenge = authenticate_2nd_new($username, $realm, $otp, undef); return wantarray ? ($username, $tfa_challenge) : $username; } else { return authenticate_2nd_old($username, $realm, $otp); -- 2.39.2