From: Stefan Schantl Date: Tue, 14 Aug 2018 10:01:53 +0000 (+0200) Subject: logs.cgi/ids.dat: Rework linking to external rule documentation. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f2f0d61fc1ecaff1f13ece1c0f85d2adbe2ba347;p=people%2Fms%2Fipfire-2.x.git logs.cgi/ids.dat: Rework linking to external rule documentation. Check if the sid of a rule belongs to sourcefire and link to the changed URL for gathering more details. If the sid of the rule belongs to emergingthreads now link to the emergingthreads documentation. Fixes #11806. Signed-off-by: Stefan Schantl Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/logs.cgi/ids.dat b/html/cgi-bin/logs.cgi/ids.dat index 98176d6902..030fd4b64d 100644 --- a/html/cgi-bin/logs.cgi/ids.dat +++ b/html/cgi-bin/logs.cgi/ids.dat @@ -335,10 +335,18 @@ print < END ; - if ($sid ne "n/a") { - print "$sid\n"; + } elsif ($sid >= 2000000 and $sid < 3000000) { + # Link to emergingthreats if the rule sid is between 2000000 and 3000000. + print "$sid\n"; } else { + # No external link for user defined rules print $sid; } print <