~ubuntu-branches/ubuntu/dapper/awstats/dapper-updates

« back to all changes in this revision

Viewing changes to debian/patches/02_backport_6.4_security-fixes.patch

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard, Charles Fry, Jonas Smedegaard
  • Date: 2005-09-19 22:41:16 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050919224116-6bo795sxx5nsosby
Tags: 6.4-2
[ Charles Fry ]
* New co-maintainer.
* Suggest libgeo-ipfree-perl. Closes: #316126 (thanks to Gunnar Wolf
  <gwolf@gwolf.org>).
* Fixed README.Debian path to configure.pl. Closes: #313093 (thanks to
  Michael De Nil <michael@flex-it.be>).

[ Jonas Smedegaard ]
* Acknowledge NMU. Closes: bug#322591.
* Bump up watch version, and adjust the default command (we have moved
  to SubVerSion).
* Add proto to URL in long description.
* User newer chown syntax in postinst (thanks to lintian).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -ruN awstats-6.3/wwwroot/cgi-bin/awstats.model.conf awstats-6.4/wwwroot/cgi-bin/awstats.model.conf
2
 
--- awstats-6.3/wwwroot/cgi-bin/awstats.model.conf      2005-02-17 02:39:33.000000000 +0100
3
 
+++ awstats-6.4/wwwroot/cgi-bin/awstats.model.conf      2005-02-11 01:45:06.000000000 +0100
4
 
@@ -696,14 +696,14 @@
5
 
 ErrorMessages=""
6
 
 
7
 
 
8
 
-# AWStat can be run with debug=x parameter to ouput various informations
9
 
-# to help in debugging or solving troubles. If you want (in most cases for 
10
 
-# security reasons) to disable debugging, set this parameter to 0.
11
 
+# AWStat can be run with debug=x parameter to output various informations
12
 
+# to help in debugging or solving troubles. If you want to allow this (not
13
 
+# enabled by default for security reasons), set this parameter to 0.
14
 
 # Change : Effective immediatly
15
 
 # Possible values: 0 or 1
16
 
-# Default: 1
17
 
+# Default: 0
18
 
 #
19
 
-DebugMessages=1
20
 
+DebugMessages=0
21
 
 
22
 
 
23
 
 # To help you to detect if your log format is good, AWStats report an error
24
 
@@ -896,6 +896,11 @@
25
 
 #        M = Average mail size (mail logs)
26
 
 #
27
 
 
28
 
+# Show monthly summary
29
 
+# Context: Web, Streaming, Mail, Ftp
30
 
+# Default: UVPHB, Possible column codes: UVPHB
31
 
+ShowSummary=UVPHB
32
 
+
33
 
 # Show monthly chart
34
 
 # Context: Web, Streaming, Mail, Ftp
35
 
 # Default: UVPHB, Possible column codes: UVPHB
36
 
@@ -938,7 +943,7 @@
37
 
 
38
 
 # Show worms chart
39
 
 # Context: Web, Streaming
40
 
-# Default: 0 (If set to 1, see also LevelForWormsDetection), Possible column codes: HBL
41
 
+# Default: 0 (If set to other than 0, see also LevelForWormsDetection), Possible column codes: HBL
42
 
 ShowWormsStats=0
43
 
 
44
 
 # Show email senders chart (For use when analyzing mail log files)
45
 
@@ -1073,9 +1078,9 @@
46
 
 # Stats by screen size
47
 
 MaxNbOfScreenSizesShown = 5
48
 
 MinHitScreenSize = 1
49
 
-# Stats by window size (following 2 parameters are not yet used)
50
 
-MaxNbOfWindowSizesShown = 5
51
 
-MinHitWindowSize = 1
52
 
+# Stats by window size (following 2 parameters are not yet used)
53
 
+MaxNbOfWindowSizesShown = 5
54
 
+MinHitWindowSize = 1
55
 
 # Stats by referers
56
 
 MaxNbOfRefererShown = 10
57
 
 MinHitRefer   = 1
58
 
diff -ruN awstats-6.3/wwwroot/cgi-bin/awstats.pl awstats-6.4/wwwroot/cgi-bin/awstats.pl
59
 
--- awstats-6.3/wwwroot/cgi-bin/awstats.pl      2005-02-17 02:39:34.000000000 +0100
60
 
+++ awstats-6.4/wwwroot/cgi-bin/awstats.pl      2005-02-11 01:45:06.000000000 +0100
61
 
@@ -6,7 +6,7 @@
62
 
 # line or a browser to read report results.
63
 
 # See AWStats documentation (in docs/ directory) for all setup instructions.
64
 
 #------------------------------------------------------------------------------
65
 
-# $Revision: 1.800 $ - $Author: eldy $ - $Date: 2005/01/22 16:34:38 $
66
 
+# $Revision: 1.810 $ - $Author: eldy $ - $Date: 2005/02/11 00:45:06 $
67
 
 require 5.005;
68
 
 
69
 
 #$|=1;
70
 
@@ -21,8 +21,8 @@
71
 
 # Defines
72
 
 #------------------------------------------------------------------------------
73
 
 use vars qw/ $REVISION $VERSION /;
74
 
-$REVISION='$Revision: 1.800 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
75
 
-$VERSION="6.3 (build $REVISION)";
76
 
+$REVISION='$Revision: 1.810 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
77
 
+$VERSION="6.4 (build $REVISION)";
78
 
 
79
 
 # ----- Constants -----
80
 
 use vars qw/
81
 
@@ -132,7 +132,7 @@
82
 
 $BuildHistoryFormat='text';
83
 
 $ExtraTrackedRowsLimit=500;
84
 
 use vars qw/
85
 
-$EnableLockForUpdate $DNSLookup $AllowAccessFromWebToAuthenticatedUsersOnly
86
 
+$DebugMessages $AllowToUpdateStatsFromBrowser $EnableLockForUpdate $DNSLookup $AllowAccessFromWebToAuthenticatedUsersOnly
87
 
 $BarHeight $BarWidth $CreateDirDataIfNotExists $KeepBackupOfHistoricFiles
88
 
 $NbOfLinesParsed $NbOfLinesDropped $NbOfLinesCorrupted $NbOfOldLines $NbOfNewLines
89
 
 $NbOfLinesShowsteps $NewLinePhase $NbOfLinesForCorruptedLog $PurgeLogFile $ArchiveLogRecords
90
 
@@ -144,7 +144,7 @@
91
 
 $Expires $UpdateStats $MigrateStats $URLNotCaseSensitive $URLWithQuery $URLReferrerWithQuery
92
 
 $DecodeUA
93
 
 /;
94
 
-($EnableLockForUpdate, $DNSLookup, $AllowAccessFromWebToAuthenticatedUsersOnly,
95
 
+($DebugMessages, $AllowToUpdateStatsFromBrowser, $EnableLockForUpdate, $DNSLookup, $AllowAccessFromWebToAuthenticatedUsersOnly,
96
 
 $BarHeight, $BarWidth, $CreateDirDataIfNotExists, $KeepBackupOfHistoricFiles,
97
 
 $NbOfLinesParsed, $NbOfLinesDropped, $NbOfLinesCorrupted, $NbOfOldLines, $NbOfNewLines,
98
 
 $NbOfLinesShowsteps, $NewLinePhase, $NbOfLinesForCorruptedLog, $PurgeLogFile, $ArchiveLogRecords,
99
 
@@ -155,29 +155,29 @@
100
 
 $AuthenticatedUsersNotCaseSensitive,
101
 
 $Expires, $UpdateStats, $MigrateStats, $URLNotCaseSensitive, $URLWithQuery, $URLReferrerWithQuery,
102
 
 $DecodeUA)=
103
 
-(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
104
 
+(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
105
 
 use vars qw/
106
 
-$AllowToUpdateStatsFromBrowser $DetailedReportsOnNewWindows
107
 
+$DetailedReportsOnNewWindows
108
 
 $FirstDayOfWeek $KeyWordsNotSensitive $SaveDatabaseFilesWithPermissionsForEveryone
109
 
-$WarningMessages $DebugMessages $ShowLinksOnUrl $UseFramesWhenCGI
110
 
-$ShowMenu $ShowMonthStats $ShowDaysOfMonthStats $ShowDaysOfWeekStats
111
 
+$WarningMessages $ShowLinksOnUrl $UseFramesWhenCGI
112
 
+$ShowMenu $ShowSummary $ShowMonthStats $ShowDaysOfMonthStats $ShowDaysOfWeekStats
113
 
 $ShowHoursStats $ShowDomainsStats $ShowHostsStats
114
 
 $ShowRobotsStats $ShowSessionsStats $ShowPagesStats $ShowFileTypesStats
115
 
 $ShowOSStats $ShowBrowsersStats $ShowOriginStats
116
 
 $ShowKeyphrasesStats $ShowKeywordsStats $ShowMiscStats $ShowHTTPErrorsStats
117
 
 $AddDataArrayMonthStats $AddDataArrayShowDaysOfMonthStats $AddDataArrayShowDaysOfWeekStats $AddDataArrayShowHoursStats
118
 
 /;
119
 
-($AllowToUpdateStatsFromBrowser, $DetailedReportsOnNewWindows,
120
 
+($DetailedReportsOnNewWindows,
121
 
 $FirstDayOfWeek, $KeyWordsNotSensitive, $SaveDatabaseFilesWithPermissionsForEveryone,
122
 
-$WarningMessages, $DebugMessages, $ShowLinksOnUrl, $UseFramesWhenCGI,
123
 
-$ShowMenu, $ShowMonthStats, $ShowDaysOfMonthStats, $ShowDaysOfWeekStats,
124
 
+$WarningMessages, $ShowLinksOnUrl, $UseFramesWhenCGI,
125
 
+$ShowMenu, $ShowSummary, $ShowMonthStats, $ShowDaysOfMonthStats, $ShowDaysOfWeekStats,
126
 
 $ShowHoursStats, $ShowDomainsStats, $ShowHostsStats,
127
 
 $ShowRobotsStats, $ShowSessionsStats, $ShowPagesStats, $ShowFileTypesStats,
128
 
 $ShowOSStats, $ShowBrowsersStats, $ShowOriginStats,
129
 
 $ShowKeyphrasesStats, $ShowKeywordsStats, $ShowMiscStats, $ShowHTTPErrorsStats,
130
 
 $AddDataArrayMonthStats, $AddDataArrayShowDaysOfMonthStats, $AddDataArrayShowDaysOfWeekStats, $AddDataArrayShowHoursStats
131
 
 )=
132
 
-(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
133
 
+(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
134
 
 use vars qw/
135
 
 $AllowFullYearView 
136
 
 $LevelForRobotsDetection $LevelForWormsDetection $LevelForBrowsersDetection $LevelForOSDetection $LevelForRefererAnalyze
137
 
@@ -259,7 +259,7 @@
138
 
 'sv'=>'se','th'=>'th','tr'=>'tr','uk'=>'ua','cy'=>'cy','wlk'=>'cy'
139
 
 );
140
 
 %LangAWStatsToFlagAwstats=(  # If flag (country ISO-3166 two letters) is not same than AWStats Lang code
141
 
-'ca'=>'es_cat','et'=>'ee','eu','es_eu',
142
 
+'ca'=>'es_cat','et'=>'ee','eu'=>'es_eu',
143
 
 'cy'=>'wlk',
144
 
 'gl'=>'glg',
145
 
 'he'=>'il',
146
 
@@ -1577,7 +1577,7 @@
147
 
        if ($URLWithQuery !~ /[0-1]/)                   { $URLWithQuery=0; }
148
 
        if ($URLReferrerWithQuery !~ /[0-1]/)           { $URLReferrerWithQuery=0; }
149
 
        if ($WarningMessages !~ /[0-1]/)                { $WarningMessages=1; }
150
 
-       if ($DebugMessages !~ /[0-1]/)                  { $DebugMessages=1; }
151
 
+       if ($DebugMessages !~ /[0-1]/)                  { $DebugMessages=0; }
152
 
        if ($NbOfLinesForCorruptedLog !~ /^\d+/ || $NbOfLinesForCorruptedLog<1) { $NbOfLinesForCorruptedLog=50; }
153
 
        if ($Expires !~ /^\d+/)                                 { $Expires=0; }
154
 
        if ($DecodeUA !~ /[0-1]/)                                               { $DecodeUA=0; }
155
 
@@ -1602,6 +1602,7 @@
156
 
        # Optional appearance setup section
157
 
        if ($MaxRowsInHTMLOutput !~ /^\d+/ || $MaxRowsInHTMLOutput<1)     { $MaxRowsInHTMLOutput=1000; }
158
 
        if ($ShowMenu !~ /[01]/)                        { $ShowMenu=1; }
159
 
+       if ($ShowSummary !~ /[01UVPHB]/)                { $ShowSummary='UVPHB'; }
160
 
        if ($ShowMonthStats !~ /[01UVPHB]/)             { $ShowMonthStats='UVPHB'; }
161
 
        if ($ShowDaysOfMonthStats !~ /[01VPHB]/)        { $ShowDaysOfMonthStats='VPHB'; }
162
 
        if ($ShowDaysOfWeekStats !~ /[01PHBL]/)         { $ShowDaysOfWeekStats='PHBL'; }
163
 
@@ -1675,6 +1676,7 @@
164
 
        $color_x =~ s/#//g; if ($color_x !~ /^[0-9|A-H]+$/i)                                     { $color_x='C1B2E2'; }
165
 
 
166
 
        # Correct param if default value is asked
167
 
+       if ($ShowSummary eq '1')        { $ShowSummary = 'UVPHB'; }
168
 
        if ($ShowMonthStats eq '1')             { $ShowMonthStats = 'UVPHB'; }
169
 
        if ($ShowDaysOfMonthStats eq '1')       { $ShowDaysOfMonthStats = 'VPHB'; }
170
 
        if ($ShowDaysOfWeekStats eq '1')    { $ShowDaysOfWeekStats = 'PHBL'; }
171
 
@@ -1824,7 +1826,8 @@
172
 
        my @PossiblePluginsDir=("$DIR/plugins","/usr/local/awstats/wwwroot/cgi-bin/plugins","/usr/share/awstats/plugins");
173
 
        my %DirAddedInINC=();
174
 
 
175
 
-       foreach my $key (keys %NoLoadPlugin) { if ($NoLoadPlugin{$key} < 0) { push @PluginsToLoad, $key; } }
176
 
+       #Removed for security reason
177
 
+       #foreach my $key (keys %NoLoadPlugin) { if ($NoLoadPlugin{$key} < 0) { push @PluginsToLoad, $key; } }
178
 
        if ($Debug) { debug("Call to Read_Plugins with list: ".join(',',@PluginsToLoad)); }
179
 
        foreach my $plugininfo (@PluginsToLoad) {
180
 
                my ($pluginfile,$pluginparam)=split(/\s+/,$plugininfo,2);
181
 
@@ -2051,7 +2054,7 @@
182
 
        }
183
 
 
184
 
        # Loop on read file
185
 
-       my $xmlold=0;
186
 
+       my $readxml=0;
187
 
        if ($withread) {
188
 
                my $countlines=0;
189
 
                my $versionnum=0;
190
 
@@ -2061,8 +2064,8 @@
191
 
                        $countlines++;
192
 
                        
193
 
                        # Test if it's xml
194
 
-                       if (! $xmlold && $_ =~ /^<xml/) {
195
 
-                               $xmlold=1;
196
 
+                       if (! $readxml && $_ =~ /^<xml/) {
197
 
+                               $readxml=1;
198
 
                                if ($Debug) { debug(" Data file format is 'xml'",1); }
199
 
                                next;
200
 
                        }
201
 
@@ -2075,7 +2078,7 @@
202
 
                        }
203
 
 
204
 
                        # Analyze fields
205
 
-                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_));
206
 
+                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_));
207
 
                        if (! $field[0]) { next; }
208
 
 
209
 
                        # Here version MUST be defined, or file will be processed as an old data file
210
 
@@ -2175,7 +2178,7 @@
211
 
                                        }
212
 
                                        $_=<HISTORY>;
213
 
                                        chomp $_; s/\r//;
214
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
215
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
216
 
                                }
217
 
                                until ($field[0] eq 'END_MISC' || $field[0] eq "${xmleb}END_MISC" || ! $_);
218
 
                                if ($field[0] ne 'END_MISC' && $field[0] ne "${xmleb}END_MISC") { error("History file \"$filetoread\" is corrupted (End of section MISC not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
219
 
@@ -2206,7 +2209,7 @@
220
 
                                        }
221
 
                                        $_=<HISTORY>;
222
 
                                        chomp $_; s/\r//;
223
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
224
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
225
 
                                }
226
 
                                until ($field[0] eq 'END_CLUSTER' || $field[0] eq "${xmleb}END_CLUSTER" || ! $_);
227
 
                                if ($field[0] ne 'END_CLUSTER' && $field[0] ne "${xmleb}END_CLUSTER") { error("History file \"$filetoread\" is corrupted (End of section CLUSTER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
228
 
@@ -2250,7 +2253,7 @@
229
 
                                        }
230
 
                                        $_=<HISTORY>;
231
 
                                        chomp $_; s/\r//;
232
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
233
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
234
 
                                }
235
 
                                until ($field[0] eq 'END_TIME' || $field[0] eq "${xmleb}END_TIME" || ! $_);
236
 
                                if ($field[0] ne 'END_TIME' && $field[0] ne "${xmleb}END_TIME") { error("History file \"$filetoread\" is corrupted (End of section TIME not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
237
 
@@ -2289,7 +2292,7 @@
238
 
                                        }
239
 
                                        $_=<HISTORY>;
240
 
                                        chomp $_; s/\r//;
241
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
242
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
243
 
                                }
244
 
                                until ($field[0] eq 'END_ORIGIN' || $field[0] eq "${xmleb}END_ORIGIN" || ! $_);
245
 
                                if ($field[0] ne 'END_ORIGIN' && $field[0] ne "${xmleb}END_ORIGIN") { error("History file \"$filetoread\" is corrupted (End of section ORIGIN not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
246
 
@@ -2320,7 +2323,7 @@
247
 
                                        }
248
 
                                        $_=<HISTORY>;
249
 
                                        chomp $_; s/\r//;
250
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
251
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
252
 
                                }
253
 
                                until ($field[0] eq 'END_DAY' || $field[0] eq "${xmleb}END_DAY" || ! $_);
254
 
                                if ($field[0] ne 'END_DAY' && $field[0] ne "${xmleb}END_DAY") { error("History file \"$filetoread\" is corrupted (End of section DAY not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
255
 
@@ -2427,7 +2430,7 @@
256
 
                                        }
257
 
                                        $_=<HISTORY>;
258
 
                                        chomp $_; s/\r//;
259
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
260
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
261
 
                                }
262
 
                                until ($field[0] eq 'END_VISITOR' || $field[0] eq "${xmleb}END_VISITOR" || ! $_);
263
 
                                if ($field[0] ne 'END_VISITOR' && $field[0] ne "${xmleb}END_VISITOR") { error("History file \"$filetoread\" is corrupted (End of section VISITOR not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
264
 
@@ -2457,7 +2460,7 @@
265
 
                                        }
266
 
                                        $_=<HISTORY>;
267
 
                                        chomp $_; s/\r//;
268
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
269
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
270
 
                                }
271
 
                                until ($field[0] eq 'END_UNKNOWNIP' || $field[0] eq "${xmleb}END_UNKNOWNIP" || ! $_);
272
 
                                if ($field[0] ne 'END_UNKNOWNIP' && $field[0] ne "${xmleb}END_UNKNOWNIP") { error("History file \"$filetoread\" is corrupted (End of section UNKOWNIP not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
273
 
@@ -2495,7 +2498,7 @@
274
 
                                        }
275
 
                                        $_=<HISTORY>;
276
 
                                        chomp $_; s/\r//;
277
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
278
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
279
 
                                }
280
 
                                until ($field[0] eq 'END_LOGIN' || $field[0] eq "${xmleb}END_LOGIN" || ! $_);
281
 
                                if ($field[0] ne 'END_LOGIN' && $field[0] ne "${xmleb}END_LOGIN") { error("History file \"$filetoread\" is corrupted (End of section LOGIN not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
282
 
@@ -2525,7 +2528,7 @@
283
 
                                        }
284
 
                                        $_=<HISTORY>;
285
 
                                        chomp $_; s/\r//;
286
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
287
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
288
 
                                }
289
 
                                until ($field[0] eq 'END_DOMAIN' || $field[0] eq "${xmleb}END_DOMAIN" || ! $_);
290
 
                                if ($field[0] ne 'END_DOMAIN' && $field[0] ne "${xmleb}END_DOMAIN") { error("History file \"$filetoread\" is corrupted (End of section DOMAIN not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
291
 
@@ -2553,7 +2556,7 @@
292
 
                                        }
293
 
                                        $_=<HISTORY>;
294
 
                                        chomp $_; s/\r//;
295
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
296
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
297
 
                                }
298
 
                                until ($field[0] eq 'END_SESSION' || $field[0] eq "${xmleb}END_SESSION" || ! $_);
299
 
                                if ($field[0] ne 'END_SESSION' && $field[0] ne "${xmleb}END_SESSION") { error("History file \"$filetoread\" is corrupted (End of section SESSION not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
300
 
@@ -2582,7 +2585,7 @@
301
 
                                        }
302
 
                                        $_=<HISTORY>;
303
 
                                        chomp $_; s/\r//;
304
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
305
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
306
 
                                }
307
 
                                until ($field[0] eq 'END_OS' || $field[0] eq "${xmleb}END_OS" || ! $_);
308
 
                                if ($field[0] ne 'END_OS' && $field[0] ne "${xmleb}END_OS") { error("History file \"$filetoread\" is corrupted (End of section OS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
309
 
@@ -2610,7 +2613,7 @@
310
 
                                        }
311
 
                                        $_=<HISTORY>;
312
 
                                        chomp $_; s/\r//;
313
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
314
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
315
 
                                }
316
 
                                until ($field[0] eq 'END_BROWSER' || $field[0] eq "${xmleb}END_BROWSER" || ! $_);
317
 
                                if ($field[0] ne 'END_BROWSER' && $field[0] ne "${xmleb}END_BROWSER") { error("History file \"$filetoread\" is corrupted (End of section BROWSER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
318
 
@@ -2638,7 +2641,7 @@
319
 
                                        }
320
 
                                        $_=<HISTORY>;
321
 
                                        chomp $_; s/\r//;
322
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
323
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
324
 
                                }
325
 
                                until ($field[0] eq 'END_UNKNOWNREFERER' || $field[0] eq "${xmleb}END_UNKNOWNREFERER" || ! $_);
326
 
                                if ($field[0] ne 'END_UNKNOWNREFERER' && $field[0] ne "${xmleb}END_UNKNOWNREFERER") { error("History file \"$filetoread\" is corrupted (End of section UNKNOWNREFERER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
327
 
@@ -2666,7 +2669,7 @@
328
 
                                        }
329
 
                                        $_=<HISTORY>;
330
 
                                        chomp $_; s/\r//;
331
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
332
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
333
 
                                }
334
 
                                until ($field[0] eq 'END_UNKNOWNREFERERBROWSER' || $field[0] eq "${xmleb}END_UNKNOWNREFERERBROWSER" || ! $_);
335
 
                                if ($field[0] ne 'END_UNKNOWNREFERERBROWSER' && $field[0] ne "${xmleb}END_UNKNOWNREFERERBROWSER") { error("History file \"$filetoread\" is corrupted (End of section UNKNOWNREFERERBROWSER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
336
 
@@ -2694,7 +2697,7 @@
337
 
                                        }
338
 
                                        $_=<HISTORY>;
339
 
                                        chomp $_; s/\r//;
340
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
341
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
342
 
                                }
343
 
                                until ($field[0] eq 'END_SCREENSIZE' || $field[0] eq "${xmleb}END_SCREENSIZE" || ! $_);
344
 
                                if ($field[0] ne 'END_SCREENSIZE' && $field[0] ne "${xmleb}END_SCREENSIZE") { error("History file \"$filetoread\" is corrupted (End of section SCREENSIZE not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
345
 
@@ -2730,7 +2733,7 @@
346
 
                                        }
347
 
                                        $_=<HISTORY>;
348
 
                                        chomp $_; s/\r//;
349
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
350
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
351
 
                                }
352
 
                                until ($field[0] eq 'END_ROBOT' || $field[0] eq "${xmleb}END_ROBOT" || ! $_);
353
 
                                if ($field[0] ne 'END_ROBOT' && $field[0] ne "${xmleb}END_ROBOT") { error("History file \"$filetoread\" is corrupted (End of section ROBOT not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
354
 
@@ -2760,7 +2763,7 @@
355
 
                                        }
356
 
                                        $_=<HISTORY>;
357
 
                                        chomp $_; s/\r//;
358
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
359
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
360
 
                                }
361
 
                                until ($field[0] eq 'END_WORMS' || $field[0] eq "${xmleb}END_WORMS" || ! $_);
362
 
                                if ($field[0] ne 'END_WORMS' && $field[0] ne "${xmleb}END_WORMS") { error("History file \"$filetoread\" is corrupted (End of section WORMS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
363
 
@@ -2790,7 +2793,7 @@
364
 
                                        }
365
 
                                        $_=<HISTORY>;
366
 
                                        chomp $_; s/\r//;
367
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
368
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
369
 
                                }
370
 
                                until ($field[0] eq 'END_EMAILSENDER' || $field[0] eq "${xmleb}END_EMAILSENDER" || ! $_);
371
 
                                if ($field[0] ne 'END_EMAILSENDER' && $field[0] ne "${xmleb}END_EMAILSENDER") { error("History file \"$filetoread\" is corrupted (End of section EMAILSENDER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
372
 
@@ -2820,7 +2823,7 @@
373
 
                                        }
374
 
                                        $_=<HISTORY>;
375
 
                                        chomp $_; s/\r//;
376
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
377
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
378
 
                                }
379
 
                                until ($field[0] eq 'END_EMAILRECEIVER' || $field[0] eq "${xmleb}END_EMAILRECEIVER" || ! $_);
380
 
                                if ($field[0] ne 'END_EMAILRECEIVER' && $field[0] ne "${xmleb}END_EMAILRECEIVER") { error("History file \"$filetoread\" is corrupted (End of section EMAILRECEIVER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
381
 
@@ -2893,7 +2896,7 @@
382
 
                                        }
383
 
                                        $_=<HISTORY>;
384
 
                                        chomp $_; s/\r//;
385
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
386
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
387
 
                                }
388
 
                                until ($field[0] eq 'END_SIDER' || $field[0] eq "${xmleb}END_SIDER" || ! $_);
389
 
                                if ($field[0] ne 'END_SIDER' && $field[0] ne "${xmleb}END_SIDER") { error("History file \"$filetoread\" is corrupted (End of section SIDER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
390
 
@@ -2925,7 +2928,7 @@
391
 
                                        }
392
 
                                        $_=<HISTORY>;
393
 
                                        chomp $_; s/\r//;
394
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
395
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
396
 
                                }
397
 
                                until ($field[0] eq 'END_FILETYPES' || $field[0] eq "${xmleb}END_FILETYPES" || ! $_);
398
 
                                if ($field[0] ne 'END_FILETYPES' && $field[0] ne "${xmleb}END_FILETYPES") { error("History file \"$filetoread\" is corrupted (End of section FILETYPES not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
399
 
@@ -2975,7 +2978,7 @@
400
 
                                        }
401
 
                                        $_=<HISTORY>;
402
 
                                        chomp $_; s/\r//;
403
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
404
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
405
 
                                }
406
 
                                until ($field[0] eq 'END_SEREFERRALS' || $field[0] eq "${xmleb}END_SEREFERRALS" || ! $_);
407
 
                                if ($field[0] ne 'END_SEREFERRALS' && $field[0] ne "${xmleb}END_SEREFERRALS") { error("History file \"$filetoread\" is corrupted (End of section SEREFERRALS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
408
 
@@ -3018,7 +3021,7 @@
409
 
                                        }
410
 
                                        $_=<HISTORY>;
411
 
                                        chomp $_; s/\r//;
412
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
413
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
414
 
                                }
415
 
                                until ($field[0] eq 'END_PAGEREFS' || $field[0] eq "${xmleb}END_PAGEREFS" || ! $_);
416
 
                                if ($field[0] ne 'END_PAGEREFS' && $field[0] ne "${xmleb}END_PAGEREFS") { error("History file \"$filetoread\" is corrupted (End of section PAGEREFS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
417
 
@@ -3082,7 +3085,7 @@
418
 
                                        }
419
 
                                        $_=<HISTORY>;
420
 
                                        chomp $_; s/\r//;
421
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
422
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
423
 
                                }
424
 
                                until ($field[0] eq 'END_SEARCHWORDS' || $field[0] eq "${xmleb}END_SEARCHWORDS" || ! $_);
425
 
                                if ($field[0] ne 'END_SEARCHWORDS' && $field[0] ne "${xmleb}END_SEARCHWORDS") { error("History file \"$filetoread\" is corrupted (End of section SEARCHWORDS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
426
 
@@ -3119,7 +3122,7 @@
427
 
                                        }
428
 
                                        $_=<HISTORY>;
429
 
                                        chomp $_; s/\r//;
430
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
431
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
432
 
                                }
433
 
                                until ($field[0] eq 'END_KEYWORDS' || $field[0] eq "${xmleb}END_KEYWORDS" || ! $_);
434
 
                                if ($field[0] ne 'END_KEYWORDS' && $field[0] ne "${xmleb}END_KEYWORDS") { error("History file \"$filetoread\" is corrupted (End of section KEYWORDS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
435
 
@@ -3148,7 +3151,7 @@
436
 
                                        }
437
 
                                        $_=<HISTORY>;
438
 
                                        chomp $_; s/\r//;
439
 
-                                       @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
440
 
+                                       @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
441
 
                                }
442
 
                                until ($field[0] eq 'END_ERRORS' || $field[0] eq "${xmleb}END_ERRORS" || ! $_);
443
 
                                if ($field[0] ne 'END_ERRORS' && $field[0] ne "${xmleb}END_ERRORS") { error("History file \"$filetoread\" is corrupted (End of section ERRORS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
444
 
@@ -3180,7 +3183,7 @@
445
 
                                                }
446
 
                                                $_=<HISTORY>;
447
 
                                                chomp $_; s/\r//;
448
 
-                                               @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
449
 
+                                               @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
450
 
                                        }
451
 
                                        until ($field[0] eq "END_SIDER_$code" || $field[0] eq "${xmleb}END_SIDER_$code" || ! $_);
452
 
                                        if ($field[0] ne "END_SIDER_$code" && $field[0] ne "${xmleb}END_SIDER_$code") { error("History file \"$filetoread\" is corrupted (End of section SIDER_$code not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
453
 
@@ -3213,7 +3216,7 @@
454
 
                                                }
455
 
                                                $_=<HISTORY>;
456
 
                                                chomp $_; s/\r//;
457
 
-                                               @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
458
 
+                                               @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
459
 
                                        }
460
 
                                        until ($field[0] eq "END_EXTRA_$extranum" || $field[0] eq "${xmleb}END_EXTRA_$extranum" || ! $_);
461
 
                                        if ($field[0] ne "END_EXTRA_$extranum" && $field[0] ne "${xmleb}END_EXTRA_$extranum") { error("History file \"$filetoread\" is corrupted (End of section EXTRA_$extranum not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
462
 
@@ -3237,7 +3240,7 @@
463
 
                         # The plugin for this section was loaded
464
 
                                    $found=1;
465
 
                                my $issectiontoload=$SectionsToLoad{"plugin_$pluginname"};
466
 
-                                   my $function="SectionReadHistory_$pluginname(\$issectiontoload,\$xmlold,\$xmleb,\$countlines)";
467
 
+                                   my $function="SectionReadHistory_$pluginname(\$issectiontoload,\$readxml,\$xmleb,\$countlines)";
468
 
                                    eval("$function");
469
 
                                        delete $SectionsToLoad{"plugin_$pluginname"};
470
 
                                        if ($SectionsToSave{"plugin_$pluginname"}) {
471
 
@@ -3257,7 +3260,7 @@
472
 
                                        do {
473
 
                                                $_=<HISTORY>;
474
 
                                                chomp $_; s/\r//;
475
 
-                                               @field=split(/\s+/,($xmlold?CleanFromTags($_):$_)); $countlines++;
476
 
+                                               @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
477
 
                                        }
478
 
                                        until ($field[0] eq "END_PLUGIN_$pluginname" || $field[0] eq "${xmleb}END_PLUGIN_$pluginname" || ! $_);
479
 
                                }
480
 
@@ -3774,7 +3777,7 @@
481
 
                print HISTORYTMP "# Unknown referer OS - Last visit date\n";
482
 
                $ValueInFile{$sectiontosave}=tell HISTORYTMP;
483
 
                print HISTORYTMP "${xmlbb}BEGIN_UNKNOWNREFERER${xmlbs}".(scalar keys %_unknownreferer_l)."${xmlbe}\n";
484
 
-               foreach (keys %_unknownreferer_l) { print HISTORYTMP "${xmlrb}$_${xmlrs}$_unknownreferer_l{$_}${xmlre}\n"; }
485
 
+               foreach (keys %_unknownreferer_l) { print HISTORYTMP "${xmlrb}".XMLEncodeForHisto($_)."${xmlrs}$_unknownreferer_l{$_}${xmlre}\n"; }
486
 
                print HISTORYTMP "${xmleb}END_UNKNOWNREFERER${xmlee}\n";
487
 
        }
488
 
        if ($sectiontosave eq 'unknownrefererbrowser') {
489
 
@@ -3783,7 +3786,7 @@
490
 
                print HISTORYTMP "# Unknown referer Browser - Last visit date\n";
491
 
                $ValueInFile{$sectiontosave}=tell HISTORYTMP;
492
 
                print HISTORYTMP "${xmlbb}BEGIN_UNKNOWNREFERERBROWSER${xmlbs}".(scalar keys %_unknownrefererbrowser_l)."${xmlbe}\n";
493
 
-               foreach (keys %_unknownrefererbrowser_l) { print HISTORYTMP "${xmlrb}$_${xmlrs}$_unknownrefererbrowser_l{$_}${xmlre}\n"; }
494
 
+               foreach (keys %_unknownrefererbrowser_l) { print HISTORYTMP "${xmlrb}".XMLEncodeForHisto($_)."${xmlrs}$_unknownrefererbrowser_l{$_}${xmlre}\n"; }
495
 
                print HISTORYTMP "${xmleb}END_UNKNOWNREFERERBROWSER${xmlee}\n";
496
 
        }
497
 
        if ($sectiontosave eq 'origin') {
498
 
@@ -4288,7 +4291,12 @@
499
 
 #------------------------------------------------------------------------------
500
 
 sub Sanitize {
501
 
        my $stringtoclean=shift;
502
 
-       $stringtoclean =~ s/[^\w_\-\\\/\.\s]//g;
503
 
+       my $full=shift||0;
504
 
+       if ($full) {
505
 
+           $stringtoclean =~ s/[^\w]//g;
506
 
+    } else {
507
 
+           $stringtoclean =~ s/[^\w\-\\\/\.:\s]//g;
508
 
+       }
509
 
        return $stringtoclean;
510
 
 }
511
 
 
512
 
@@ -5353,6 +5361,7 @@
513
 
 # be set to force AWStats to be ran as CLI even from a web page.
514
 
 if ($ENV{'AWSTATS_DEL_GATEWAY_INTERFACE'}) { $ENV{'GATEWAY_INTERFACE'}=''; }
515
 
 if ($ENV{'GATEWAY_INTERFACE'}) {       # Run from a browser as CGI
516
 
+    $DebugMessages=0;
517
 
        # Prepare QueryString
518
 
        if ($ENV{'CONTENT_LENGTH'}) {
519
 
                binmode STDIN;
520
 
@@ -5393,6 +5402,7 @@
521
 
        }
522
 
 }
523
 
 else {                                                         # Run from command line
524
 
+    $DebugMessages=1;
525
 
        # Prepare QueryString
526
 
        for (0..@ARGV-1) {
527
 
                # If migrate
528
 
@@ -5440,6 +5450,7 @@
529
 
        if ($QueryString =~ /showcorrupted/i)                           { $ShowCorrupted=1; $QueryString=~s/showcorrupted[^&]*//i; }
530
 
        if ($QueryString =~ /showdropped/i)                                     { $ShowDropped=1; $QueryString=~s/showdropped[^&]*//i; }
531
 
        if ($QueryString =~ /showunknownorigin/i)                       { $ShowUnknownOrigin=1; $QueryString=~s/showunknownorigin[^&]*//i; }
532
 
+
533
 
 }
534
 
 if ($QueryString =~ /(^|&)staticlinks/i)                       { $StaticLinks=".$SiteConfig"; }
535
 
 if ($QueryString =~ /(^|&)staticlinks=([^&]+)/i)       { $StaticLinks=".$2"; }         # When ran from awstatsbuildstaticpages.pl
536
 
@@ -5447,8 +5458,9 @@
537
 
 if ($QueryString =~ /(^|&)framename=([^&]+)/i)         { $FrameName="$2"; }
538
 
 if ($QueryString =~ /(^|&)debug=(\d+)/i)                       { $Debug=$2; }
539
 
 if ($QueryString =~ /(^|&)updatefor=(\d+)/i)           { $UpdateFor=$2; }
540
 
-if ($QueryString =~ /(^|&)noloadplugin=([^&]+)/i)      { foreach (split(/,/,$2)) { $NoLoadPlugin{&Sanitize("$_")}=1; } }
541
 
-if ($QueryString =~ /(^|&)loadplugin=([^&]+)/i)                { foreach (split(/,/,$2)) { $NoLoadPlugin{&Sanitize("$_")}=-1; } }
542
 
+if ($QueryString =~ /(^|&)noloadplugin=([^&]+)/i)      { foreach (split(/,/,$2)) { $NoLoadPlugin{&Sanitize("$_",1)}=1; } }
543
 
+#Removed for security reasons
544
 
+#if ($QueryString =~ /(^|&)loadplugin=([^&]+)/i)               { foreach (split(/,/,$2)) { $NoLoadPlugin{&Sanitize("$_",1)}=-1; } }
545
 
 if ($QueryString =~ /(^|&)limitflush=(\d+)/i)          { $LIMITFLUSH=$2; }
546
 
 # Get/Define output
547
 
 if ($QueryString =~ /(^|&)output(=[^&]*|)(.*)&output(=[^&]*|)(&|$)/i) { error("Only 1 output option is allowed","","",1); }
548
 
@@ -5488,7 +5500,7 @@
549
 
 # Print AWStats and Perl version 
550
 
 if ($Debug) {
551
 
        debug(ucfirst($PROG)." - $VERSION - Perl $^X $]",1);
552
 
-       debug("DIR=$DIR PROG=$PROG",2);
553
 
+       debug("DIR=$DIR PROG=$PROG Extension=$Extension",2);
554
 
        debug("QUERY_STRING=$QueryString",2);
555
 
        debug("HTMLOutput=".join(',',keys %HTMLOutput),1);
556
 
        debug("YearRequired=$YearRequired, MonthRequired=$MonthRequired",2);
557
 
@@ -5634,6 +5646,10 @@
558
 
 &Check_Config();
559
 
 # Now SiteDomain is defined
560
 
 
561
 
+if ($Debug && ! $DebugMessages) {
562
 
+    error("Debug has not been allowed. Change DebugMessages parameter in config file to allow debug.");   
563
 
+}
564
 
+
565
 
 # Define frame name and correct variable for frames
566
 
 if (! $FrameName) {
567
 
        if ($ENV{'GATEWAY_INTERFACE'} && $UseFramesWhenCGI && $HTMLOutput{'main'} && ! $PluginMode) { $FrameName='index'; }
568
 
@@ -8453,7 +8469,7 @@
569
 
 
570
 
                # SUMMARY
571
 
                #---------------------------------------------------------------------
572
 
-               if ($ShowMonthStats) {
573
 
+               if ($ShowSummary) {
574
 
                        if ($Debug) { debug("ShowSummary",2); }
575
 
                        #print "$Center<a name=\"summary\">&nbsp;</a><br />\n";
576
 
                        my $title="$Message[128]";
577
 
@@ -8498,11 +8514,11 @@
578
 
                        # Show main indicators title row
579
 
                        print "<tr>";
580
 
                        if ($LogType eq 'W' || $LogType eq 'S') { print "<td bgcolor=\"#$color_TableBGTitle\">&nbsp;</td>"; }
581
 
-                       if ($ShowMonthStats =~ /U/i) { print "<td width=\"$w%\" bgcolor=\"#$color_u\"".Tooltip(2).">$Message[11]</td>"; } else { print "<td bgcolor=\"#$color_TableBGTitle\" width=\"20%\">&nbsp;</td>"; }
582
 
-                       if ($ShowMonthStats =~ /V/i) { print "<td width=\"$w%\" bgcolor=\"#$color_v\"".Tooltip(1).">$Message[10]</td>"; } else { print "<td bgcolor=\"#$color_TableBGTitle\" width=\"20%\">&nbsp;</td>"; }
583
 
-                       if ($ShowMonthStats =~ /P/i) { print "<td width=\"$w%\" bgcolor=\"#$color_p\"".Tooltip(3).">$Message[56]</td>"; } else { print "<td bgcolor=\"#$color_TableBGTitle\" width=\"20%\">&nbsp;</td>"; }
584
 
-                       if ($ShowMonthStats =~ /H/i) { print "<td width=\"$w%\" bgcolor=\"#$color_h\"".Tooltip(4).">$Message[57]</td>"; } else { print "<td bgcolor=\"#$color_TableBGTitle\" width=\"20%\">&nbsp;</td>"; }
585
 
-                       if ($ShowMonthStats =~ /B/i) { print "<td width=\"$w%\" bgcolor=\"#$color_k\"".Tooltip(5).">$Message[75]</td>"; } else { print "<td bgcolor=\"#$color_TableBGTitle\" width=\"20%\">&nbsp;</td>"; }
586
 
+                       if ($ShowSummary =~ /U/i) { print "<td width=\"$w%\" bgcolor=\"#$color_u\"".Tooltip(2).">$Message[11]</td>"; } else { print "<td bgcolor=\"#$color_TableBGTitle\" width=\"20%\">&nbsp;</td>"; }
587
 
+                       if ($ShowSummary =~ /V/i) { print "<td width=\"$w%\" bgcolor=\"#$color_v\"".Tooltip(1).">$Message[10]</td>"; } else { print "<td bgcolor=\"#$color_TableBGTitle\" width=\"20%\">&nbsp;</td>"; }
588
 
+                       if ($ShowSummary =~ /P/i) { print "<td width=\"$w%\" bgcolor=\"#$color_p\"".Tooltip(3).">$Message[56]</td>"; } else { print "<td bgcolor=\"#$color_TableBGTitle\" width=\"20%\">&nbsp;</td>"; }
589
 
+                       if ($ShowSummary =~ /H/i) { print "<td width=\"$w%\" bgcolor=\"#$color_h\"".Tooltip(4).">$Message[57]</td>"; } else { print "<td bgcolor=\"#$color_TableBGTitle\" width=\"20%\">&nbsp;</td>"; }
590
 
+                       if ($ShowSummary =~ /B/i) { print "<td width=\"$w%\" bgcolor=\"#$color_k\"".Tooltip(5).">$Message[75]</td>"; } else { print "<td bgcolor=\"#$color_TableBGTitle\" width=\"20%\">&nbsp;</td>"; }
591
 
                        print "</tr>\n";
592
 
                        # Show main indicators values for viewed traffic
593
 
                        print "<tr>";
594
 
@@ -8510,16 +8526,16 @@
595
 
                                print "<td class=\"aws\">$Message[165]</td>";
596
 
                                print "<td>&nbsp;<br />&nbsp;</td>\n";
597
 
                                print "<td>&nbsp;<br />&nbsp;</td>\n";
598
 
-                               if ($ShowMonthStats =~ /H/i) { print "<td><b>$TotalHits</b>".($LogType eq 'M'?"":"<br />($RatioHits&nbsp;".lc($Message[57]."/".$Message[12]).")</td>"); } else { print "<td>&nbsp;</td>"; }
599
 
-                               if ($ShowMonthStats =~ /B/i) { print "<td><b>".Format_Bytes(int($TotalBytes))."</b><br />($RatioBytes&nbsp;$Message[108]/".lc($Message[($LogType eq 'M'?149:12)]).")</td>"; } else { print "<td>&nbsp;</td>"; }
600
 
+                               if ($ShowSummary =~ /H/i) { print "<td><b>$TotalHits</b>".($LogType eq 'M'?"":"<br />($RatioHits&nbsp;".lc($Message[57]."/".$Message[12]).")")."</td>"; } else { print "<td>&nbsp;</td>"; }
601
 
+                               if ($ShowSummary =~ /B/i) { print "<td><b>".Format_Bytes(int($TotalBytes))."</b><br />($RatioBytes&nbsp;$Message[108]/".lc($Message[($LogType eq 'M'?149:12)]).")</td>"; } else { print "<td>&nbsp;</td>"; }
602
 
                        }
603
 
                        else {
604
 
                                if ($LogType eq 'W' || $LogType eq 'S') { print "<td class=\"aws\">$Message[160]&nbsp;*</td>"; }
605
 
-                               if ($ShowMonthStats =~ /U/i) { print "<td>".($MonthRequired eq 'all'?"<b>&lt;= $TotalUnique</b><br />$Message[129]":"<b>$TotalUnique</b><br />&nbsp;")."</td>"; } else { print "<td>&nbsp;</td>"; }
606
 
-                               if ($ShowMonthStats =~ /V/i) { print "<td><b>$TotalVisits</b><br />($RatioVisits&nbsp;$Message[52])</td>"; } else { print "<td>&nbsp;</td>"; }
607
 
-                               if ($ShowMonthStats =~ /P/i) { print "<td><b>$TotalPages</b><br />($RatioPages&nbsp;".lc($Message[56]."/".$Message[12]).")</td>"; } else { print "<td>&nbsp;</td>"; }
608
 
-                               if ($ShowMonthStats =~ /H/i) { print "<td><b>$TotalHits</b>".($LogType eq 'M'?"":"<br />($RatioHits&nbsp;".lc($Message[57]."/".$Message[12]).")</td>"); } else { print "<td>&nbsp;</td>"; }
609
 
-                               if ($ShowMonthStats =~ /B/i) { print "<td><b>".Format_Bytes(int($TotalBytes))."</b><br />($RatioBytes&nbsp;$Message[108]/".lc($Message[($LogType eq 'M'?149:12)]).")</td>"; } else { print "<td>&nbsp;</td>"; }
610
 
+                               if ($ShowSummary =~ /U/i) { print "<td>".($MonthRequired eq 'all'?"<b>&lt;= $TotalUnique</b><br />$Message[129]":"<b>$TotalUnique</b><br />&nbsp;")."</td>"; } else { print "<td>&nbsp;</td>"; }
611
 
+                               if ($ShowSummary =~ /V/i) { print "<td><b>$TotalVisits</b><br />($RatioVisits&nbsp;$Message[52])</td>"; } else { print "<td>&nbsp;</td>"; }
612
 
+                               if ($ShowSummary =~ /P/i) { print "<td><b>$TotalPages</b><br />($RatioPages&nbsp;".lc($Message[56]."/".$Message[12]).")</td>"; } else { print "<td>&nbsp;</td>"; }
613
 
+                               if ($ShowSummary =~ /H/i) { print "<td><b>$TotalHits</b>".($LogType eq 'M'?"":"<br />($RatioHits&nbsp;".lc($Message[57]."/".$Message[12]).")")."</td>"; } else { print "<td>&nbsp;</td>"; }
614
 
+                               if ($ShowSummary =~ /B/i) { print "<td><b>".Format_Bytes(int($TotalBytes))."</b><br />($RatioBytes&nbsp;$Message[108]/".lc($Message[($LogType eq 'M'?149:12)]).")</td>"; } else { print "<td>&nbsp;</td>"; }
615
 
                        }
616
 
                        print "</tr>\n";
617
 
                        # Show main indicators values for not viewed traffic values
618
 
@@ -8529,15 +8545,15 @@
619
 
                                print "<td class=\"aws\">$Message[166]</td>";
620
 
                                print "<td>&nbsp;<br />&nbsp;</td>\n";
621
 
                                print "<td>&nbsp;<br />&nbsp;</td>\n";
622
 
-                               if ($ShowMonthStats =~ /H/i) { print "<td><b>$TotalNotViewedHits</b></td>"; } else { print "<td>&nbsp;</td>"; }
623
 
-                               if ($ShowMonthStats =~ /B/i) { print "<td><b>".Format_Bytes(int($TotalNotViewedBytes))."</b></td>"; } else { print "<td>&nbsp;</td>"; }
624
 
+                               if ($ShowSummary =~ /H/i) { print "<td><b>$TotalNotViewedHits</b></td>"; } else { print "<td>&nbsp;</td>"; }
625
 
+                               if ($ShowSummary =~ /B/i) { print "<td><b>".Format_Bytes(int($TotalNotViewedBytes))."</b></td>"; } else { print "<td>&nbsp;</td>"; }
626
 
                        }
627
 
                        else {
628
 
                                if ($LogType eq 'W' || $LogType eq 'S') { print "<td class=\"aws\">$Message[161]&nbsp;*</td>"; }
629
 
                                print "<td colspan=\"2\">&nbsp;<br />&nbsp;</td>\n";
630
 
-                               if ($ShowMonthStats =~ /P/i) { print "<td><b>$TotalNotViewedPages</b></td>"; } else { print "<td>&nbsp;</td>"; }
631
 
-                               if ($ShowMonthStats =~ /H/i) { print "<td><b>$TotalNotViewedHits</b></td>"; } else { print "<td>&nbsp;</td>"; }
632
 
-                               if ($ShowMonthStats =~ /B/i) { print "<td><b>".Format_Bytes(int($TotalNotViewedBytes))."</b></td>"; } else { print "<td>&nbsp;</td>"; }
633
 
+                               if ($ShowSummary =~ /P/i) { print "<td><b>$TotalNotViewedPages</b></td>"; } else { print "<td>&nbsp;</td>"; }
634
 
+                               if ($ShowSummary =~ /H/i) { print "<td><b>$TotalNotViewedHits</b></td>"; } else { print "<td>&nbsp;</td>"; }
635
 
+                               if ($ShowSummary =~ /B/i) { print "<td><b>".Format_Bytes(int($TotalNotViewedBytes))."</b></td>"; } else { print "<td>&nbsp;</td>"; }
636
 
                        }
637
 
                        print "</tr>\n";
638
 
             }
639
 
@@ -8616,7 +8632,6 @@
640
 
                                        print "<td>";
641
 
                                        if ($ShowMonthStats =~ /U/i) { print "<img align=\"bottom\" src=\"$DirIcons\/other\/$BarPng{'vu'}\" height=\"$bredde_u\" width=\"6\"".AltTitle("$Message[11]: ".($MonthUnique{$YearRequired.$monthix}||0))." />"; }
642
 
                                        if ($ShowMonthStats =~ /V/i) { print "<img align=\"bottom\" src=\"$DirIcons\/other\/$BarPng{'vv'}\" height=\"$bredde_v\" width=\"6\"".AltTitle("$Message[10]: ".($MonthVisits{$YearRequired.$monthix}||0))." />"; }
643
 
-                                       if ($QueryString !~ /buildpdf/i) { print "&nbsp;"; }
644
 
                                        if ($ShowMonthStats =~ /P/i) { print "<img align=\"bottom\" src=\"$DirIcons\/other\/$BarPng{'vp'}\" height=\"$bredde_p\" width=\"6\"".AltTitle("$Message[56]: ".($MonthPages{$YearRequired.$monthix}||0))." />"; }
645
 
                                        if ($ShowMonthStats =~ /H/i) { print "<img align=\"bottom\" src=\"$DirIcons\/other\/$BarPng{'vh'}\" height=\"$bredde_h\" width=\"6\"".AltTitle("$Message[57]: ".($MonthHits{$YearRequired.$monthix}||0))." />"; }
646
 
                                        if ($ShowMonthStats =~ /B/i) { print "<img align=\"bottom\" src=\"$DirIcons\/other\/$BarPng{'vk'}\" height=\"$bredde_k\" width=\"6\"".AltTitle("$Message[75]: ".Format_Bytes($MonthBytes{$YearRequired.$monthix}))." />"; }