From patchwork Thu Mar 21 20:51:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 7654 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4V0yLR5KJpz3wkd for ; Thu, 21 Mar 2024 20:51:43 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4V0yLC43SxzFLg; Thu, 21 Mar 2024 20:51:31 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4V0yLC06W9z32v7; Thu, 21 Mar 2024 20:51:31 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4V0yL76j4Xz32qp for ; Thu, 21 Mar 2024 20:51:27 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4V0yL73vYFznn; Thu, 21 Mar 2024 20:51:27 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1711054287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mGn8/YjpOw1x3yvrMD2zKvgCeoUF7p7vCJPgDemLjJw=; b=K2T+hyiyCg6m6IOeo+GmUTFwR53Cko3qyXiZ/nLdTtKP30mCzdBr5woeDotzW/8n0GDJqj rxFAYvNj7OZ0siBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1711054287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mGn8/YjpOw1x3yvrMD2zKvgCeoUF7p7vCJPgDemLjJw=; b=uPBq2xU8zI9NSnP8Mljrv39kzHbYQUYevAvVYiQWDsLCKgtbjnCl9U/ITUSjxOwCQCiTyn O8wYIgjNyaBpza4KcybriMRR7O/ZXaiwT7j7znaxD8vMyMxJNevfy+DnkrlvpHW8+0qXQL 7NT897USnWSSzdEUtNbzwoWYTQDJfd9NBzss2jOYM9zzAfE6hk6gAfU3drdqP0n/7GJfdg ezyhhnrXQF5r8AKZqaXHz1nhmlfhh/8lCX/pvt/Y9jj7s9agrK+nffILsAqd4nNpn5lgIu w2KMe6TO2VSb50Yip6OuP6XfKP+9dNVS2eSGsHrYTQA/jypGNl9ZsDF3lIAAkg== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 2/5] ids.cgi: Change check if a provider is not longer supported Date: Thu, 21 Mar 2024 21:51:15 +0100 Message-Id: <20240321205118.382948-2-stefan.schantl@ipfire.org> In-Reply-To: <20240321205118.382948-1-stefan.schantl@ipfire.org> References: <20240321205118.382948-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: YE5BW745JGQC27QWMBVOJZCIY74RG4I5 X-Message-ID-Hash: YE5BW745JGQC27QWMBVOJZCIY74RG4I5 X-MailFrom: stefan.schantl@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- html/cgi-bin/ids.cgi | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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"; }