ids.cgi: Fix downloading rules if source changed

Fix the if statement to detect wheater the ruleset has been
changed and automatically download the new one.

Fixes #11984.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
Stefan Schantl
2019-02-05 12:36:30 +01:00
parent b7a9b4edc2
commit 5709768b0b

View File

@@ -324,7 +324,7 @@ if ($cgiparams{'RULESET'} eq $Lang::tr{'save'}) {
}
# Check if a ruleset is present - if not or the source has been changed download it.
unless ((%idsrules) || ($oldsettings{'RULES'} eq $cgiparams{'RULES'})) {
if((! %idsrules) || ($oldsettings{'RULES'} ne $cgiparams{'RULES'})) {
# Check if the red device is active.
unless (-e "${General::swroot}/red/active") {
$errormessage = "$Lang::tr{'could not download latest updates'} - $Lang::tr{'system is offline'}";