mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
captive: Verify that the user actually accepted the terms and conditions
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -116,15 +116,22 @@ if ($cgiparams{'ACTION'} eq "SUBMIT") {
|
||||
$errormessage = $Lang::tr{"Captive please enter a coupon code"};
|
||||
}
|
||||
|
||||
# License
|
||||
# Terms
|
||||
} else {
|
||||
# Copy session expiry time
|
||||
$clientshash{$key}[3] = $settings{'SESSION_TIME'} || "0";
|
||||
# Make sure that they have been accepted
|
||||
if ($cgiparams{'TERMS'} eq "on") {
|
||||
# Copy session expiry time
|
||||
$clientshash{$key}[3] = $settings{'SESSION_TIME'} || "0";
|
||||
|
||||
# No coupon code
|
||||
$clientshash{$key}[4] = "TERMS";
|
||||
# No coupon code
|
||||
$clientshash{$key}[4] = "TERMS";
|
||||
|
||||
&General::log("Captive", "Internet access granted via license agreement for $ip_address until $clientshash{$key}[3]");
|
||||
&General::log("Captive", "Internet access granted via license agreement for $ip_address until $clientshash{$key}[3]");
|
||||
|
||||
# The terms have not been accepted
|
||||
} else {
|
||||
$errormessage = $Lang::tr{'Captive please accept the terms and conditions'};
|
||||
}
|
||||
}
|
||||
|
||||
# If no errors were found, save configruation and reload
|
||||
|
||||
Reference in New Issue
Block a user