From 2ccc47f1944fcf1f8eec8ad132fa606081b21578 Mon Sep 17 00:00:00 2001 From: Rob Brewer Date: Sat, 5 Mar 2022 21:18:42 +0000 Subject: [PATCH] modified regex for V3 log-prefix added space --- html/cgi-bin/logs.cgi/showrequestfromblacklist.dat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/html/cgi-bin/logs.cgi/showrequestfromblacklist.dat b/html/cgi-bin/logs.cgi/showrequestfromblacklist.dat index 0de381a2d..2f73c3ee5 100755 --- a/html/cgi-bin/logs.cgi/showrequestfromblacklist.dat +++ b/html/cgi-bin/logs.cgi/showrequestfromblacklist.dat @@ -161,7 +161,7 @@ my $blacklist = $cgiparams{blacklist}; if (!$skip) { while () { - if (/^${monthstr} ${daystr} ..:..:.. [\w\-]+ kernel:.*BLKLST_(\w+)IN=.*/) { + if (/^${monthstr} ${daystr} ..:..:.. [\w\-]+ kernel:.*BLKLST_(\w+)\s?IN=.*/) { if($1 eq $blacklist){ $log[$lines] = $_; $lines++; @@ -186,7 +186,7 @@ if ($multifile) { } if (!$skip) { while () { - if (/^${monthstr} ${daystr} ..:..:.. [\w\-]+ kernel:.*BLKLST_(\w+)IN=.*/) { + if (/^${monthstr} ${daystr} ..:..:.. [\w\-]+ kernel:.*BLKLST_(\w+)\s?IN=.*/) { if($1 eq $blacklist){ $log[$lines] = $_; $lines++; @@ -308,7 +308,7 @@ $lines = 0; foreach $_ (@slice) { $a = $_; # Check whether valid ipv4 or ipv6 address - if (($_ =~ /BLKLST_(\w+)IN=/)) { + if (($_ =~ /BLKLST_(\w+)\s?IN=/)) { if($1 eq $blacklist) { my $in = '-'; my $out = '-'; -- 2.47.2