mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-10 19:15:54 +02:00
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 <stefan.schantl@ipfire.org>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user