mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-26 19:00:34 +02:00
ids.cgi: Fix check and message when trying to enable suricata without
any enabled or no provider. Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
@@ -530,9 +530,12 @@ if ($cgiparams{'RULESET'} eq $Lang::tr{'ids apply'}) {
|
||||
|
||||
# Check if the IDS should be enabled.
|
||||
if ($cgiparams{'ENABLE_IDS'} eq "on") {
|
||||
# Get enabled providers.
|
||||
my @enabled_providers = &IDS::get_enabled_providers();
|
||||
|
||||
# Check if any ruleset is available. Otherwise abort and display an error.
|
||||
unless(%used_providers) {
|
||||
$errormessage = $Lang::tr{'ids no ruleset available'};
|
||||
unless(@enabled_providers) {
|
||||
$errormessage = $Lang::tr{'ids no enabled ruleset provider'};
|
||||
}
|
||||
|
||||
# Loop through the array of available interfaces.
|
||||
|
||||
Reference in New Issue
Block a user