[2/5] ids.cgi: Change check if a provider is not longer supported

Message ID 20240321205118.382948-2-stefan.schantl@ipfire.org
State Accepted
Commit df7977fde7dec9516036afd8b687acab9f034bf4
Headers
Series [1/5] ids-functions.pl: Improve logic to get the cached rulesfile of a provider |

Commit Message

Stefan Schantl March 21, 2024, 8:51 p.m. UTC
  This check is now based on a download URL instead of checking if
an entry in the ruleset sources is present.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 html/cgi-bin/ids.cgi | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
  

Patch

diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi
index 369bf0276..e29482fa8 100644
--- a/html/cgi-bin/ids.cgi
+++ b/html/cgi-bin/ids.cgi
@@ -1171,11 +1171,7 @@  END
 				}
 
 				# 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;
-
+				unless ($IDS::Ruleset::Providers{$provider}{'dl_url'}) {
 					# Assign background color
 					$col="bgcolor='#FF4D4D'";
 				}
@@ -1809,7 +1805,7 @@  sub show_additional_provider_actions() {
 	}
 
 	# Disable the manual update button if the provider is not longer supported.
-	unless ($IDS::Ruleset::Providers{$provider}) {
+	unless ($IDS::Ruleset::Providers{$provider}{"dl_url"}) {
 		$disabled_update = "disabled";
 	}