From: Stefan Schantl Date: Tue, 7 Mar 2023 12:17:35 +0000 (+0100) Subject: ipblocklist.cgi: Fix settings checkbox handling X-Git-Tag: v2.27-core174~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0450dce6f6eb02fc539c0f0d0ccc01a281dcad58;p=ipfire-2.x.git ipblocklist.cgi: Fix settings checkbox handling Checkboxes does not submit any values if they are not checked. Default them to "off" in such a case. This fixes the issue not beeing able to disable the logging. Fixes #12979. Signed-off-by: Stefan Schantl Reviewed-by: Adolf Belka --- diff --git a/html/cgi-bin/ipblocklist.cgi b/html/cgi-bin/ipblocklist.cgi index bb438129c9..b79eb155fe 100644 --- a/html/cgi-bin/ipblocklist.cgi +++ b/html/cgi-bin/ipblocklist.cgi @@ -72,6 +72,10 @@ my @blocklists = &IPblocklist::get_blocklists(); # Process actions if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}") { + # Assign checkbox values, in case they are not checked. + $cgiparams{'ENABLE'} = "off" unless($cgiparams{'ENABLE'}); + $cgiparams{'LOGGING'} = "off" unless($cgiparams{'LOGGING'}); + # Array to store if blocklists are missing on the system # and needs to be downloaded first. my @missing_blocklists = ();