From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] ids.cgi: Improve add provider logic Date: Fri, 22 Mar 2024 06:01:45 +0100 Message-ID: <20240322050145.3155-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1096949993393864884==" List-Id: --===============1096949993393864884== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Do not longer add unsupported/removed providers as an option when adding a new/first ruleset provider. Signed-off-by: Stefan Schantl --- html/cgi-bin/ids.cgi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 2d4ac6fc3..edab97195 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -1711,6 +1711,12 @@ END # Grab the provider handle. my $provider =3D $tmphash{$provider_name}; =20 + # Check if we are not in edit mode. + if ($cgiparams{'PROVIDERS'} ne "$Lang::tr{'edit'}") { + # Skip unsupported ruleset provider. + next unless(exists($IDS::Ruleset::Providers{$provider}{"dl_url"})); + } + # Pre-select the provider if one is given. if (($used_providers{$cgiparams{'ID'}}[0] eq "$provider") || ($cgipar= ams{'PROVIDER'} eq "$provider")) { $selected{$provider} =3D "selected=3D'selected'"; --=20 2.39.2 --===============1096949993393864884==--