From 1b939d0ecc1c9e0551a5f926e2810ae03bca5f8a Mon Sep 17 00:00:00 2001 From: =?utf8?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=utf8 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 | 157 +++++++++++++++++++++---------------------- 1 file changed, 78 insertions(+), 79 deletions(-) diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 161464d0d9..27e61e9bb5 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"; - - # Output display table for rule files - print "
\n"; + print"\n"; - # Loop over each rule file - foreach my $rulefile (sort keys(%idsrules)) { - my $rulechecked = ''; + # Output display table for rule files + print "
\n"; - # 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); + # Loop over each rule file + foreach my $rulefile (sort keys(%idsrules)) { + my $rulechecked = ''; - # Table and rows for the rule files. - print"\n"; - print"\n"; - print"\n"; - print"\n"; - print"\n"; + # Check if rule file is enabled + if ($idsrules{$rulefile}{'Rulefile'}{'State'} eq 'on') { + $rulechecked = 'CHECKED'; + } - # Rows which will be hidden per default and will contain the single rules. - print"\n"; - 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""; + # Create rule checkbox and display rule description + print "\n"; + print ""; + + # Increment rule count + $lines++; + } + + # If do not have a second rule for row, create empty cell + if (($lines % 2) != 0) { + print ""; } # Close display table - print "
\n"; - print"\n"; - print"$rulefile\n"; - print"$Lang::tr{'ids show'}\n"; - print"
\n"; + print"\n"; + print"$rulefile\n"; + print"$Lang::tr{'ids show'}\n"; + print"
\n"; + print "\n"; + print "$idsrules{$rulefile}{$sid}{'Description'}
"; + 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(); -- 2.39.2