From: Michael Tremer Date: Fri, 12 Apr 2019 16:32:02 +0000 (+0100) Subject: IPS logging: Fix reading date X-Git-Tag: v2.23-core131~36 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=19c066b602a12fcce601cfa2350b0d83b231717c 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 --- 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;