From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCHv2] logs.cgi/ids.dat: Rework linking to external rule documentation. Date: Tue, 14 Aug 2018 11:48:26 +0100 Message-ID: <7d4596910931a774382805fb5fde6b8bd60577f6.camel@ipfire.org> In-Reply-To: <20180814100153.6901-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2033937454744185327==" List-Id: --===============2033937454744185327== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Thanks. Merged. On Tue, 2018-08-14 at 12:01 +0200, Stefan Schantl wrote: > 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 > --- > html/cgi-bin/logs.cgi/ids.dat | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/html/cgi-bin/logs.cgi/ids.dat b/html/cgi-bin/logs.cgi/ids.dat > index 98176d690..030fd4b64 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 " + if ($sid eq "n/a") { > + print $sid; > + } elsif ($sid < 1000000) { > + # Link to sourcefire if the the rule sid is less than 1000000. > + print " + print "target='_blank'>$sid\n"; > + } elsif ($sid >= 2000000 and $sid < 3000000) { > + # Link to emergingthreats if the rule sid is between 2000000 and 3000000. > + print " print "target='_blank'>$sid\n"; > } else { > + # No external link for user defined rules > print $sid; > } > print <