~ubuntu-branches/ubuntu/intrepid/awstats/intrepid-security

« back to all changes in this revision

Viewing changes to debian/patches/1005_logresolve-dates.patch

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-02-06 14:06:59 UTC
  • Revision ID: james.westby@ubuntu.com-20070206140659-ejhod3ffaqp7tn6u
Tags: 6.5+dfsg-1ubuntu3
Add 'debian/patches/1005_logresolve-dates.patch': correct log parsing,
fixed in upstream 6.6 (Closes LP#51902).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: awstats-6.5+dfsg/tools/logresolvemerge.pl
 
2
===================================================================
 
3
--- awstats-6.5+dfsg.orig/tools/logresolvemerge.pl      2007-02-06 14:00:41.000000000 -0800
 
4
+++ awstats-6.5+dfsg/tools/logresolvemerge.pl   2007-02-06 14:05:39.000000000 -0800
 
5
@@ -518,8 +518,10 @@
 
6
                        # Split DD/Month/YYYY:HH:MM:SS or YYYY-MM-DD HH:MM:SS or MM/DD/YY\tHH:MM:SS
 
7
                        my $year=0; my $month=0; my $day=0; my $hour=0; my $minute=0; my $second=0;
 
8
                        if ($_ =~ /(\d\d\d\d)-(\d\d)-(\d\d)\s(\d\d):(\d\d):(\d\d)/) { $year=$1; $month=$2; $day=$3; $hour=$4; $minute=$5; $second=$6; }
 
9
-                       elsif ($_ =~ /\[(\d\d)[\/:\s](\w+)[\/:\s](\d\d\d\d)[\/:\s](\d\d)[\/:\s](\d\d)[\/:\s](\d\d) /) { $year=$3; $month=$2; $day=$1; $hour=$4; $minute=$5; $second=$6; }
 
10
-                       elsif ($_ =~ /\[\w+ (\w+) (\d\d) (\d\d)[\/:\s](\d\d)[\/:\s](\d\d) (\d\d\d\d)\]/) { $year=$6; $month=$1; $day=$2; $hour=$3; $minute=$4; $second=$5; }
 
11
+                       elsif ($_ =~ /\[(\d?\d)[\/:\s](\w+)[\/:\s](\d\d\d\d)[\/:\s](\d\d)[\/:\s](\d\d)[\/:\s](\d\d) /) { $year=$3; $month=$2; $day=$1; $hour=$4; $minute=$5; $second=$6; }
 
12
+                       elsif ($_ =~ /\[\w+ (\w+) (\d?\d) (\d\d)[\/:\s](\d\d)[\/:\s](\d\d) (\d\d\d\d)\]/) { $year=$6; $month=$1; $day=$2; $hour=$3; $minute=$4; $second=$5; }
 
13
+
 
14
+                       if (length $day == 1) { $day = "0".$day; }
 
15
 
 
16
                        if ($monthnum{$month}) { $month=$monthnum{$month}; }    # Change lib month in num month if necessary
 
17