mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-20 16:02:59 +02:00
captive portal: Don't remove unlimited access after one hour
Reported-by: Daniel Weismüller <daniel.weismueller@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user