Skip to content

Commit

Permalink
fix syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Sep 8, 2023
1 parent d96d557 commit 4640abe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions script/thruk_auth
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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'}) {
Expand Down

0 comments on commit 4640abe

Please sign in to comment.