]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/ids.cgi
ids.cgi: Proper handle providers which are not longer supported.
[ipfire-2.x.git] / html / cgi-bin / ids.cgi
index cdfc77ac08b62e729025215b619d32d031504453..2a837bfc1e1c67caecb78f77efd3ee986da4c9ff 100644 (file)
@@ -1161,6 +1161,16 @@ END
                                        $col="bgcolor='$color{'color20'}'";
                                }
 
+                               # Handle providers which are not longer supported.
+                               unless ($provider_name) {
+                                       # Set the provider name to the provider handle
+                                       # to display something helpful.
+                                       $provider_name = $provider;
+
+                                       # Assign background color
+                                       $col="bgcolor='#FF4D4D'";
+                               }
+
                                # Choose icons for the checkboxes.
                                my $status_gif;
                                my $status_gdesc;
@@ -2031,6 +2041,9 @@ sub get_provider_name($) {
        my ($handle) = @_;
        my $provider_name;
 
+       # Early exit if the given provider does not longer exist.
+       return unless ($IDS::Ruleset::Providers{$handle});
+
        # Get the required translation string for the given provider handle.
        my $tr_string = $IDS::Ruleset::Providers{$handle}{'tr_string'};