SF.net SVN: logwatch:[233]

[email protected] Tue, 9 Sep 2014 15:52:32 +0000
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
Revision: 233
          http://sourceforge.net/p/logwatch/code/233
Author:   stefjakobs
Date:     2014-09-09 15:52:31 +0000 (Tue, 09 Sep 2014)
Log Message:
-----------
http: ENV is passed lc to the service script. Make the checks against ignoreURLs case insensitive and document it.

Modified Paths:
--------------
    conf/services/http.conf
    scripts/services/http

Modified: conf/services/http.conf
===================================================================
--- conf/services/http.conf	2014-09-09 15:33:19 UTC (rev 232)
+++ conf/services/http.conf	2014-09-09 15:52:31 UTC (rev 233)
@@ -44,6 +44,7 @@
 # Ignore requests
 # Note - will not do ANY processing, counts, etc... just skip it and go to
 # the next entry in the log file.
+# Note - The match will be case insensitive; e.g. /model/ == /MoDel/
 # Examples:
 # 1. Ignore all URLs starting with /model/ and ending with 1 to 10 digits
 #   $HTTP_IGNORE_URLS = ^/model/\d{1,10}$

Modified: scripts/services/http
===================================================================
--- scripts/services/http	2014-09-09 15:33:19 UTC (rev 232)
+++ scripts/services/http	2014-09-09 15:52:31 UTC (rev 233)
@@ -406,7 +406,7 @@
       for (my $i = 0; $i < @exploits; $i++) {
          # print "$i $exploits[$i] $field{lc_url} \n";
          if ( ($field{lc_url} =~ /$exploits[$i]/i) &&
-              !((defined $ignoreURLs) && ($field{url} =~ /$ignoreURLs/)) &&
+              !((defined $ignoreURLs) && ($field{url} =~ /$ignoreURLs/i)) &&
               !((defined $ignoreIPs) && ($field{client_ip} =~ /$ignoreIPs/)) ) {
             $hacks{$field{client_ip}}{$exploits[$i]}++;
             $total_hack_count += 1;
@@ -700,7 +700,7 @@
 sub shouldIgnore {
    my($context)=@_;
 
-   if( ((defined $ignoreURLs) && ($field{url} =~ /$ignoreURLs/)) ||
+   if( ((defined $ignoreURLs) && ($field{url} =~ /$ignoreURLs/i)) ||
        ((defined $ignoreIPs) && ($field{client_ip} =~ /$ignoreIPs/)) ) {
       return 1;
    }

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk