]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ids.cgi: Fix downloading rules if source changed
authorStefan Schantl <stefan.schantl@ipfire.org>
Tue, 5 Feb 2019 11:36:30 +0000 (12:36 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Tue, 5 Feb 2019 11:36:30 +0000 (12:36 +0100)
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>
html/cgi-bin/ids.cgi

index 56d39fd60b615d76320c03a10b86057b023561bd..151181fdc0087aec0df98309d9c505a06eb857ea 100644 (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'}";