From: Dominik Csapak Date: Mon, 18 Mar 2019 09:39:56 +0000 (+0100) Subject: fix vnc ticket verification without authkey lifetime X-Git-Url: https://git.proxmox.com/?p=pve-access-control.git;a=commitdiff_plain;h=5efff6c19619c64c7b66d3deabb3d392602d95cf fix vnc ticket verification without authkey lifetime since $authkey_lifetime is currently set to 0, we have to check this, else we always fail to verify the VNC ticket Signed-off-by: Dominik Csapak --- diff --git a/PVE/AccessControl.pm b/PVE/AccessControl.pm index 6cfc841..51ef3ee 100644 --- a/PVE/AccessControl.pm +++ b/PVE/AccessControl.pm @@ -327,7 +327,7 @@ sub verify_vnc_ticket { my $secret_data = "$username:$path"; my ($rsa_pub, $rsa_mtime) = get_pubkey(); - if (!$rsa_pub || (time() - $rsa_mtime > $authkey_lifetime)) { + if (!$rsa_pub || (time() - $rsa_mtime > $authkey_lifetime && $authkey_lifetime > 0)) { if ($noerr) { return undef; } else {