]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
ids.cgi: Make backend code for forced ruleset update working again.
authorStefan Schantl <stefan.schantl@ipfire.org>
Fri, 2 Apr 2021 09:00:17 +0000 (11:00 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 19 Dec 2021 12:23:43 +0000 (13:23 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/ids.cgi

index e702e8d2ef1d0b117bcf2ae5b162f05533918a53..1684b7757d69cd450b196049ebe3e7106c1baf08 100644 (file)
@@ -496,7 +496,10 @@ if ($cgiparams{'RULESET'} eq $Lang::tr{'ids apply'}) {
        &reload();
 
 # Download new ruleset.
-} elsif ($cgiparams{'RULESET'} eq $Lang::tr{'update ruleset'}) {
+} elsif ($cgiparams{'PROVIDERS'} eq $Lang::tr{'ids force ruleset update'}) {
+       # Assign given provider handle.
+       my $provider = $cgiparams{'PROVIDER'};
+
        # 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'}";
@@ -514,7 +517,7 @@ if ($cgiparams{'RULESET'} eq $Lang::tr{'ids apply'}) {
                &working_notice("$Lang::tr{'ids download new ruleset'}");
 
                # Call subfunction to download the ruleset.
-               if(&IDS::downloadruleset()) {
+               if(&IDS::downloadruleset($provider)) {
                        $errormessage = $Lang::tr{'could not download latest updates'};
 
                        # Call function to store the errormessage.