]> git.ipfire.org Git - people/helix/ipfire-2.x.git/commitdiff
modified regex for V3 log-prefix added space ipblacklist.v3
authorRob Brewer <rob.brewer@ipfire.org>
Sat, 5 Mar 2022 21:18:42 +0000 (21:18 +0000)
committerRob Brewer <rob.brewer@ipfire.org>
Sat, 5 Mar 2022 21:18:42 +0000 (21:18 +0000)
html/cgi-bin/logs.cgi/showrequestfromblacklist.dat

index 0de381a2d6a7348c35bebe9ebce3925eb6d17387..2f73c3ee539c6660f11d610436de776de734c79b 100755 (executable)
@@ -161,7 +161,7 @@ my $blacklist = $cgiparams{blacklist};
 if (!$skip)
 {
        while (<FILE>) {
-               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 (<FILE>) {
-                       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 = '-';