From 4640abed3ceed2b3949a6cd82bff4276e9f2dfc4 Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Fri, 8 Sep 2023 16:54:27 +0200 Subject: [PATCH] fix syntax error --- script/thruk_auth | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script/thruk_auth b/script/thruk_auth index 6ad72bc196..32cf42e57f 100755 --- a/script/thruk_auth +++ b/script/thruk_auth @@ -222,7 +222,7 @@ sub process { my $auth = $1; # use session cache for a few seconds - my $cache_timeout = (defined $sessioncache->{$auth} && $sessioncache->{$auth}->{'failed'} ? $sessionfailtimeout : $sessioncachetimeout; + my $cache_timeout = (defined $sessioncache->{$auth} && $sessioncache->{$auth}->{'failed'}) ? $sessionfailtimeout : $sessioncachetimeout; if(defined $sessioncache->{$auth} && ($cache_timeout == 0 || ($cache_timeout > 0 && $sessioncache->{$auth}->{'time'} >= $now - $cache_timeout))) { if($sessioncache->{$auth}->{'failed'}) { _debug("login failed by cache hit") if $verbose > 1; @@ -263,7 +263,6 @@ sub process { # revalidation disabled my $basicauth = $session->{'hash'}; - my $cache_timeout = (defined $sessioncache->{$auth} && $sessioncache->{$auth}->{'failed'} ? $sessionfailtimeout : $sessioncachetimeout; if($cache_timeout == 0 || !defined $basicauth || $basicauth eq 'none') { # no validation enabled if($sessioncache->{$auth}->{'failed'}) {