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 <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2019-03-18 10:39:56 +01:00 committed by Thomas Lamprecht
parent 7fb70c9421
commit 5efff6c196

View File

@ -327,7 +327,7 @@ sub verify_vnc_ticket {
my $secret_data = "$username:$path"; my $secret_data = "$username:$path";
my ($rsa_pub, $rsa_mtime) = get_pubkey(); 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) { if ($noerr) {
return undef; return undef;
} else { } else {