From: Stefan Schantl Date: Wed, 13 Dec 2017 10:46:40 +0000 (+0100) Subject: ids.cgi: Add check when altering the ruleset X-Git-Tag: suricata-beta3~33^2~39^2~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c51a044a2a93042605fc599eaccf69f49fa7bc87;p=people%2Fstevee%2Fipfire-2.x.git ids.cgi: Add check when altering the ruleset Add a check if the currently processing sid is nummeric, otherwise skip it. Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 2fd4a2f903..63f914701b 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -153,6 +153,9 @@ if ($cgiparams{'RULESET'} eq $Lang::tr{'update'}) { foreach my $rulefile (keys %snortrules) { # Loop through the single rules of the rulefile. foreach my $sid (keys %{$snortrules{$rulefile}}) { + # Skip the current sid if it is not numeric. + next unless ($sid =~ /\d+/ ); + # Check if there exists a key in the cgiparams hash for this sid. if (exists($cgiparams{$sid})) { # Look if the rule is disabled.