From 19c066b602a12fcce601cfa2350b0d83b231717c Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 12 Apr 2019 17:32:02 +0100 Subject: [PATCH] IPS logging: Fix reading date The CGI script only compares mm/dd and does not care about the year. Suricata, however, logs the year as well which has to be ignored here. Signed-off-by: Michael Tremer --- html/cgi-bin/logs.cgi/ids.dat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/cgi-bin/logs.cgi/ids.dat b/html/cgi-bin/logs.cgi/ids.dat index 1447a06f05..5e4613753c 100644 --- a/html/cgi-bin/logs.cgi/ids.dat +++ b/html/cgi-bin/logs.cgi/ids.dat @@ -447,8 +447,8 @@ sub processevent $destport = $10; } - if ($_ =~ m/^([0-9\/]{3,10})\-([0-9\:]{5,8})\.([0-9]{1,14})/) { - ($date,$time) = ($1,$2); + if ($_ =~ m/^([0-9\/]{3,5})(\/\d+)?\-([0-9\:]{5,8})\.([0-9]{1,14})/) { + ($date,$time) = ($1,$3); } if ($_ =~ m/\[Xref \=\>.*\]/) { $_ =~ s/\]\[Xref \=\> /, /g; -- 2.39.2