From b1773d1a37700ce2b07290750052d91983a65620 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 5 Oct 2017 12:04:29 +0200 Subject: [PATCH] captive portal: Don't remove unlimited access after one hour MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported-by: Daniel Weismüller Signed-off-by: Michael Tremer --- src/scripts/captive-cleanup | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scripts/captive-cleanup b/src/scripts/captive-cleanup index c39e4883a1..cf73760d0d 100755 --- a/src/scripts/captive-cleanup +++ b/src/scripts/captive-cleanup @@ -35,6 +35,9 @@ if (-f $settingsfile && -f $clients && ! -z $clients){ &General::readhasharray("$clients", \%clientshash); $time = time(); foreach my $key (keys %clientshash) { + # Skip unlimited access lines + next if ($clientshash{$key}[3] == 0); + $expiretime=($clientshash{$key}[2])+$clientshash{$key}[3]; if ($expiretime < $time){ delete $clientshash{$key}; -- 2.39.2