]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ids.cgi: Remove newly added provider if the rules could not be
authorStefan Schantl <stefan.schantl@ipfire.org>
Sat, 26 Mar 2022 11:26:35 +0000 (12:26 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sat, 26 Mar 2022 11:26:35 +0000 (12:26 +0100)
downloaded.

When adding a new provider and in case the rules file or tarball can not
be downloaded, the provider remains as configured.

To avoid that, the provider needs to be removed again.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/ids.cgi

index 0907ba15ac3c979df299e1e370903889a5753850..07fcae9e3e267e089d7989677a1f56b70f9d30d4 100644 (file)
@@ -805,6 +805,9 @@ if ($cgiparams{'RULESET'} eq $Lang::tr{'ids apply'}) {
 
                                # Perform a reload of the page.
                                &reload();
+                       } else {
+                               # Remove the configured provider again.
+                               &remove_provider($id);
                        }
                }