[pve-devel] applied: [PATCH manager 2/3] HTTPServer: verify_ticket now returns a hash

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Apr 8 17:00:37 CEST 2019


On 4/8/19 1:58 PM, Wolfgang Bumiller wrote:
> 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');
>  	}
> 

applied




More information about the pve-devel mailing list