captive: Fix saving empty terms

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2017-10-09 14:34:21 +01:00
parent 6772cc8035
commit bef7ad5bbe

View File

@@ -97,7 +97,7 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'save'}) {
&General::writehash("$settingsfile", \%settings);
# Save terms
if ($cgiparams{'TERMS'}){
if ($settings{'AUTH'} eq 'TERMS') {
$cgiparams{'TERMS'} = &Header::escape($cgiparams{'TERMS'});
open(FH, ">:utf8", "/var/ipfire/captive/terms.txt") or die("$!");
print FH $cgiparams{'TERMS'};