mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
captive: Fix bug with multiple license clients
If one active client with a license existed, any other client authenticating will overwrite the configuration line. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -54,8 +54,6 @@ unless (-f $clients){ system("touch $clients"); }
|
||||
|
||||
#Actions
|
||||
if ($cgiparams{'ACTION'} eq "$Lang::tr{'gpl i accept these terms and conditions'}"){
|
||||
my $key = &General::findhasharraykey(\%clientshash);
|
||||
|
||||
#Get Clients IP-Address
|
||||
my $ip_address = $ENV{X_FORWARDED_FOR} || $ENV{REMOTE_ADDR} ||"";
|
||||
|
||||
@@ -64,6 +62,7 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'gpl i accept these terms and conditions'
|
||||
$mac_address =~ s/\n+\z//;
|
||||
|
||||
&General::readhasharray("$clients", \%clientshash);
|
||||
my $key = &General::findhasharraykey(\%clientshash);
|
||||
|
||||
if (!$errormessage){
|
||||
foreach my $i (0 .. 5) { $clientshash{$key}[$i] = "";}
|
||||
|
||||
Reference in New Issue
Block a user