[pve-devel] [PATCH manager 2/3] HTTPServer: verify_ticket now returns a hash
Wolfgang Bumiller
w.bumiller at proxmox.com
Mon Apr 8 13:58:29 CEST 2019
Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
---
PVE/HTTPServer.pm | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/PVE/HTTPServer.pm b/PVE/HTTPServer.pm
index ec57cd09..ce895725 100755
--- a/PVE/HTTPServer.pm
+++ b/PVE/HTTPServer.pm
@@ -80,10 +80,12 @@ sub auth_handler {
die "No ticket\n" if !$ticket;
- ($username, $age, my $challenge) = PVE::AccessControl::verify_ticket($ticket);
+ ($username, $age, my $tfa_info) = PVE::AccessControl::verify_ticket($ticket);
- if (defined($challenge)) {
- $rpcenv->set_u2f_challenge($challenge);
+ if (defined($tfa_info)) {
+ if (defined(my $challenge = $tfa_info->{challenge})) {
+ $rpcenv->set_u2f_challenge($challenge);
+ }
die "No ticket\n"
if ($rel_uri ne '/access/tfa' || $method ne 'POST');
}
--
2.11.0
More information about the pve-devel
mailing list