X-Git-Url: https://git.treefish.org/fex.git/blobdiff_plain/cdeb354c4dbb11b683f9f8c5db2861f3dc572c61..HEAD:/bin/logwatch?ds=inline diff --git a/bin/logwatch b/bin/logwatch index fdc2f25..3aafafb 100755 --- a/bin/logwatch +++ b/bin/logwatch @@ -120,7 +120,11 @@ for (;;) { } $post = /\nPOST\s/; if (/^\n*(CONNECT|CONTINUE).*\s\[([\d_]+)\]/i) { $pid = $2 } - if (/\n(POST|GET)\s+\/(\w+)/i) { $cgi = $2 } + if (/\n(POST|GET)\s+(\S+)/i) { + $cgi = $2; + $cgi =~ s:.*/::; + $cgi =~ s:\?.*::; + } if (/Content-Length: (\d+)/i) { $d = $1; while ($d =~ s/(\d)(\d\d\d\b)/$1,$2/) {}; @@ -180,6 +184,7 @@ sub read_debug_log { binmode($log,":utf8"); while (<$log>) { s/\r//; + s/[^\x09\x20-\xFF]/_/g; if (/^Content-Disposition:.*name="FILE".*filename="(.+)"/i) { print " FILE=\"$1\"\n"; } elsif (/^Content-Disposition:.*name="(\w+)"/i) {