From 6f3b3cd089cea0f308c0b67e17ed864f6aa50b83 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Thu, 6 Sep 2018 13:28:20 +0200 Subject: [PATCH] logs.cgi/ids.dat: Dont display/export empty events. Check if the current processed event has at least datetime and a title. Otherwise skip it. Signed-off-by: Stefan Schantl --- html/cgi-bin/logs.cgi/ids.dat | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/html/cgi-bin/logs.cgi/ids.dat b/html/cgi-bin/logs.cgi/ids.dat index fba1cbc195..21737511f8 100644 --- a/html/cgi-bin/logs.cgi/ids.dat +++ b/html/cgi-bin/logs.cgi/ids.dat @@ -167,6 +167,10 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'export'}) { my ($datetime,$title,$priority,$classification,$srcip,$srcport,$destip,$destport,$sid,$refs) = split(/\|/); $refs =~ s/,$//; + + # Skip event if no datetime and title are available. + next unless (($datetime) && ($title)); + print "Date: $datetime\n"; print "Name: $title\n"; print "Priority: $priority\n"; @@ -285,6 +289,10 @@ foreach $_ (@slice) else { print "\n"; } my ($datetime,$title,$priority,$classification,$srcip,$srcport,$destip,$destport,$sid,$refs) = split(/\|/); + + # Only show the current event if at least datetime and title are available. + next unless (($datetime) && ($title)); + print < -- 2.39.2