From: Michael Tremer Date: Mon, 9 Oct 2017 13:34:21 +0000 (+0100) Subject: captive: Fix saving empty terms X-Git-Tag: v2.19-core115~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bef7ad5bbecbb3ed36d8c3c38fcca67b84487213;p=people%2Fstevee%2Fipfire-2.x.git captive: Fix saving empty terms Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/captive.cgi b/html/cgi-bin/captive.cgi index 92ce453eba..ae3ebbf7fb 100755 --- a/html/cgi-bin/captive.cgi +++ b/html/cgi-bin/captive.cgi @@ -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'};