From patchwork Mon Feb 9 14:23:22 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 9496 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) (Client CN "mail01.haj.ipfire.org", Issuer "R12" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4f8n7547Mpz3wpn for ; Mon, 09 Feb 2026 14:26:09 +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) (Client CN "mail02.haj.ipfire.org", Issuer "E8" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4f8n7524rdz5gb for ; Mon, 09 Feb 2026 14:26:09 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4f8n711ZN9z34Cb for ; Mon, 09 Feb 2026 14:26:05 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [IPv6:2001:678:b28::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail01.haj.ipfire.org", Issuer "R12" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4f8n6y2TqNz334V for ; Mon, 09 Feb 2026 14:26:02 +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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4f8n6x6lBBz5Xb; Mon, 09 Feb 2026 14:26:01 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1770647162; 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=/04vFsR1J3XpzWpYMxPXcvSVJjU4GFHPyhZBTFujl+4=; b=mKTV+fNrpwP9PfJ6MI6+jSq19EvhvBf/c7fsqDqD6vmqEvpYDMs8zHrl+i3XgnAZor/HtS gxa9yCdsQJaURWAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1770647162; 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=/04vFsR1J3XpzWpYMxPXcvSVJjU4GFHPyhZBTFujl+4=; b=phm6zjpSEUc4fByep0MZB/fbRWZNOFcJ+R2I/6gByscdDRuLNka9ngnF1kQ2QGSSL9TNwC 4G2eQE94G81Cq9p7bjRKZrO/h94MztCFjMl6W0azmKeer7DnOgpKFjqvcI48wgHP0RNaIA 5+i/BheLZBaS56MEvN1mhwHoXqGzeLn3qWEbCxwgv1e9P1BW+kCaEho4yfdzqsqZgMT8Hs 3/JQNMBpGWa6GGn0vFx5CXd+1RwTT6uWvIbep6mxaT0Rb6lk9/LpXj0Mt3UjZxSKreK+WD XKNj02TXywlE+wR5IvP+mtOcIQk9TMPrppx0bvRbGMKUIHyYAmfYGuctcuokiw== From: Stefan Schantl To: development@lists.ipfire.org Cc: Stefan Schantl Subject: [PATCH 4/4] logs.cgi/ids.dat: Use new mechanic to obtain sid info url's Date: Mon, 9 Feb 2026 15:23:22 +0100 Message-ID: <20260209142322.2481-4-stefan.schantl@ipfire.org> In-Reply-To: <20260209142322.2481-1-stefan.schantl@ipfire.org> References: <20260209142322.2481-1-stefan.schantl@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Signed-off-by: Stefan Schantl --- html/cgi-bin/logs.cgi/ids.dat | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/html/cgi-bin/logs.cgi/ids.dat b/html/cgi-bin/logs.cgi/ids.dat index deebced21..ef224e3e6 100644 --- a/html/cgi-bin/logs.cgi/ids.dat +++ b/html/cgi-bin/logs.cgi/ids.dat @@ -22,6 +22,7 @@ use strict; my $report_generator_binary = "/usr/bin/suricata-report-generator"; require '/var/ipfire/general-functions.pl'; +require "${General::swroot}/ids-functions.pl"; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; @@ -389,21 +390,26 @@ print < END ; - if ($sid eq "n/a") { - print $sid; - } elsif ($sid < 1000000) { - # Link to sourcefire if the the rule sid is less than 1000000. - print "$sid\n"; - } elsif ($sid >= 2000000 and $sid < 3000000) { - # Link to emergingthreats if the rule sid is between 2000000 and 3000000. - print "$sid\n"; + + # Check if an valid sid has been found. + if ($sid ne "n/a") { + # Try to get the info url for the sid. + my $info_url = &IDS::get_sid_info_url($sid); + + # Check if an url has been obtained. + if ($info_url) { + print "$sid\n"; + } else { + # No external link available. + print $sid; + } } else { # No external link for user defined rules print $sid; } print <