From 1b939d0ecc1c9e0551a5f926e2810ae03bca5f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20M=C3=BCller?= Date: Sat, 29 Jan 2022 17:07:34 +0000 Subject: [PATCH] ids.cgi: Fix unmatched curly bracket and trailing whitespaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The former causes this CGI to crash with an HTTP error 500. Signed-off-by: Peter Müller --- html/cgi-bin/ids.cgi | 163 +++++++++++++++++++++---------------------- 1 file changed, 81 insertions(+), 82 deletions(-) diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 161464d0d..27e61e9bb 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -1019,7 +1019,7 @@ if ($cgiparams{'RULESET'} eq $Lang::tr{'ids apply'}) { &IDS::call_suricatactrl("stop"); } } - + # Undefine providers flag. undef($cgiparams{'PROVIDERS'}); @@ -1468,7 +1468,7 @@ print <

- +
END @@ -1522,7 +1522,7 @@ sub show_customize_ruleset() { print"var hide = \"$Lang::tr{'ids hide'}\"\;\n"; print <\n"; + print"
\n"; - # Output display table for rule files + # Output display table for rule files + print "
\n"; + + # Loop over each rule file + foreach my $rulefile (sort keys(%idsrules)) { + my $rulechecked = ''; + + # Check if rule file is enabled + if ($idsrules{$rulefile}{'Rulefile'}{'State'} eq 'on') { + $rulechecked = 'CHECKED'; + } + + # Convert rulefile name into category name. + my $categoryname = &_rulefile_to_category($rulefile); + + # Table and rows for the rule files. + print"\n"; + print"\n"; + print"\n"; + print"\n"; + print"\n"; + + # Rows which will be hidden per default and will contain the single rules. + print"\n"; + print"
\n"; + print"\n"; + print"$rulefile\n"; + print"$Lang::tr{'ids show'}\n"; + print"
"; + } - print <"; + + print < @@ -1642,8 +1642,7 @@ END END ; - &Header::closebox(); - } + &Header::closebox(); } # @@ -1905,7 +1904,7 @@ sub show_additional_provider_actions() { - + END ; &Header::closebox();