[pve-devel] [PATCH access-control 1/2] fix a 'use of undefined...' warning

Wolfgang Bumiller w.bumiller at proxmox.com
Mon Dec 6 09:38:00 CET 2021


Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
---
 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 168fc26..51a96a3 100644
--- a/src/PVE/AccessControl.pm
+++ b/src/PVE/AccessControl.pm
@@ -781,9 +781,9 @@ sub authenticate_2nd_new : prototype($$$$) {
 	}
 
 	my $realm_type = $realm_tfa && $realm_tfa->{type};
-	$realm_type = 'totp' if $realm_type eq 'oath'; # we used to call it that
 	# verify realm type unless using recovery keys:
 	if (defined($realm_type)) {
+	    $realm_type = 'totp' if $realm_type eq 'oath'; # we used to call it that
 	    if ($realm_type eq 'yubico') {
 		# Yubico auth will not be supported in rust for now...
 		if (!defined($tfa_challenge)) {
-- 
2.30.2






More information about the pve-devel mailing list