From 28ec897247698cf3a1c1db5d4e3c5a0f2c5706bb Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Mon, 25 Jul 2022 13:52:56 +0200 Subject: [PATCH] tfa: pass whole webauthn config to 'set_webauthn_config' the field names are being kept compatible Signed-off-by: Wolfgang Bumiller --- src/PVE/AccessControl.pm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/PVE/AccessControl.pm b/src/PVE/AccessControl.pm index 91b3aff..c32dcc3 100644 --- a/src/PVE/AccessControl.pm +++ b/src/PVE/AccessControl.pm @@ -921,13 +921,8 @@ sub configure_u2f_and_wa : prototype($) { warn "u2f unavailable, configuration error: $@\n" if $@; } if (my $wa = $dc->{webauthn}) { - eval { - $tfa_cfg->set_webauthn_config({ - origin => $wa->{origin} // $get_origin->(), - rp => $wa->{rp}, - id => $wa->{id}, - }); - }; + $wa->{origin} //= $get_origin->(); + eval { $tfa_cfg->set_webauthn_config({%$wa}) }; warn "webauthn unavailable, configuration error: $@\n" if $@; } } -- 2.39.2