head	1.14;
access;
symbols
	RELEASE_5_EOL:1.13
	RELEASE_7_0_0:1.12
	RELEASE_6_3_0:1.12
	PRE_XORG_7:1.12
	RELEASE_4_EOL:1.12
	RELEASE_6_2_0:1.12
	RELEASE_6_1_0:1.12
	RELEASE_5_5_0:1.12
	RELEASE_6_0_0:1.12
	RELEASE_5_4_0:1.12
	RELEASE_4_11_0:1.12
	RELEASE_5_3_0:1.12
	RELEASE_4_10_0:1.12
	RELEASE_5_2_1:1.12
	RELEASE_5_2_0:1.12
	RELEASE_4_9_0:1.12
	RELEASE_5_1_0:1.12
	RELEASE_4_8_0:1.12
	RELEASE_5_0_0:1.12
	RELEASE_4_7_0:1.12
	RELEASE_4_6_2:1.12
	RELEASE_4_6_1:1.12
	RELEASE_4_6_0:1.12
	RELEASE_5_0_DP1:1.11
	RELEASE_4_5_0:1.10
	RELEASE_4_4_0:1.9
	old_RELEASE_4_3_0:1.8
	old_RELEASE_4_2_0:1.8
	old_RELEASE_4_1_1:1.3
	old_RELEASE_4_1_0:1.3
	old_RELEASE_3_5_0:1.3;
locks; strict;
comment	@# @;


1.14
date	2008.07.17.14.08.56;	author dinoex;	state dead;
branches;
next	1.13;

1.13
date	2008.01.14.09.24.06;	author dinoex;	state Exp;
branches;
next	1.12;

1.12
date	2002.04.18.04.23.54;	author dinoex;	state Exp;
branches;
next	1.11;

1.11
date	2002.02.12.05.22.17;	author dinoex;	state Exp;
branches;
next	1.10;

1.10
date	2001.10.25.07.04.52;	author dinoex;	state Exp;
branches;
next	1.9;

1.9
date	2001.06.28.20.00.49;	author dinoex;	state Exp;
branches;
next	1.8;

1.8
date	2000.10.25.00.42.37;	author ache;	state Exp;
branches;
next	1.7;

1.7
date	2000.10.14.13.47.12;	author ache;	state Exp;
branches;
next	1.6;

1.6
date	2000.10.10.15.53.51;	author ache;	state Exp;
branches;
next	1.5;

1.5
date	2000.09.30.14.19.53;	author ache;	state Exp;
branches;
next	1.4;

1.4
date	2000.09.28.16.12.33;	author ache;	state Exp;
branches;
next	1.3;

1.3
date	2000.04.21.19.25.44;	author ache;	state Exp;
branches;
next	1.2;

1.2
date	2000.04.20.01.50.47;	author ache;	state Exp;
branches;
next	1.1;

1.1
date	2000.04.18.19.04.36;	author ache;	state Exp;
branches;
next	;


desc
@@


1.14
log
@- update to 2.20-01
@
text
@--- webalizer.c.orig	2007-11-10 15:13:44.000000000 +0100
+++ webalizer.c	2007-11-10 15:17:44.000000000 +0100
@@@@ -231,7 +231,7 @@@@
 int main(int argc, char *argv[])
 {
    int      i;                           /* generic counter             */
-   char     *cp1, *cp2, *cp3, *str;      /* generic char pointers       */
+   unsigned char *cp1, *cp2, *cp3, *str;      /* generic char pointers       */
    NLISTPTR lptr;                        /* generic list pointer        */
 
    extern char *optarg;                  /* used for command line       */
@@@@ -569,7 +569,7 @@@@
 
          /* convert month name to lowercase */
          for (i=4;i<7;i++)
-            log_rec.datetime[i]=tolower(log_rec.datetime[i]);
+	    log_rec.datetime[i]=tolower((unsigned char)log_rec.datetime[i]);
 
          /* get year/month/day/hour/min/sec values    */
          for (i=0;i<12;i++)
@@@@ -713,7 +713,7 @@@@
          {
             if ((cp1=strstr(log_rec.url,lptr->string))!=NULL)
             {
-               if ((cp1==log_rec.url)||(*(cp1-1)=='/'))
+	       if ((cp1==(unsigned char *)log_rec.url)||(*(cp1-1)=='/'))
                {
                   *cp1='\0';
                   if (log_rec.url[0]=='\0')
@@@@ -1471,19 +1471,19 @@@@
    while ( (fgets(buffer,BUFSIZE,fp)) != NULL)
    {
       /* skip comments and blank lines */
-      if ( (buffer[0]=='#') || isspace((int)buffer[0]) ) continue;
+      if ( (buffer[0]=='#') || isspace((unsigned char)buffer[0]) ) continue;
 
       /* Get keyword */
       cp1=buffer;cp2=keyword;
-      while ( isalnum((int)*cp1) ) *cp2++ = *cp1++;
+      while ( isalnum((unsigned char)*cp1) ) *cp2++ = *cp1++;
       *cp2='\0';
 
       /* Get value */
       cp2=value;
-      while ( (*cp1!='\n')&&(*cp1!='\0')&&(isspace((int)*cp1)) ) cp1++;
+      while ( (*cp1!='\n')&&(*cp1!='\0')&&(isspace((unsigned char)*cp1)) ) cp1++;
       while ( (*cp1!='\n')&&(*cp1!='\0') ) *cp2++ = *cp1++;
       *cp2--='\0';
-      while ( (isspace((int)*cp2)) && (cp2 != value) ) *cp2--='\0';
+      while ( (isspace((unsigned char)*cp2)) && (cp2 != value) ) *cp2--='\0';
 
       /* check if blank keyword/value */
       if ( (keyword[0]=='\0') || (value[0]=='\0') ) continue;
@@@@ -1826,7 +1826,11 @@@@
          if (*cp1=='+') *cp1=' ';                      /* change + to space  */
          if (sp_flg && *cp1==' ') { cp1++; continue; } /* compress spaces    */
          if (*cp1==' ') sp_flg=1; else sp_flg=0;       /* (flag spaces here) */
+#ifdef WEBALIZER_LOWERCASE_SEARCH
          *cp2++=tolower(*cp1);                         /* normal character   */
+#else
+	 *cp2++= *cp1;                               /* normal character   */
+#endif
          cp1++;
       }
    }
@@@@ -1862,7 +1866,7 @@@@
    int  i=group_domains+1;
 
    cp = str+strlen(str)-1;
-   if (isdigit((int)*cp)) return NULL;   /* ignore IP addresses */
+   if (isdigit((unsigned char)*cp)) return NULL;   /* ignore IP addresses */
 
    while (cp!=str)
    {
@


1.13
log
@- new option WITH_WEBALIZER_LOWERCASE_SEARCH
lowercase search strings like in unpathced webalizer
default is to not lowercase search strings to honor intenational charsets.
Submitted by:	Frank Altpeter

- adding default HTMLHead to sample.conf
HTMLHead <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
Reported by:	Lapo Luchini
@
text
@@


1.12
log
@- Update to 2.1.10,
- fixes buffer-overflow repoted on BUGTRAQ
- part of patch is now in the distribution
@
text
@d1 2
a2 2
--- webalizer.c.orig	Wed Oct 24 10:24:51 2001
+++ webalizer.c	Tue Feb 12 05:29:59 2002
d30 1
a30 1
@@@@ -1466,19 +1466,19 @@@@
d54 1
a54 1
@@@@ -1820,7 +1820,7 @@@@
d58 3
a60 1
-         *cp2++=tolower(*cp1);                         /* normal character   */
d62 1
d66 1
a66 1
@@@@ -1855,7 +1855,7 @@@@
@


1.11
log
@- Apply a patch, bump PORTREVISION

The problem is that webalizer strips down all national characters from
query strings making impossible to use its Search String report for
non-English sites.

Submitted by:	ache
@
text
@a29 9
@@@@ -735,7 +735,7 @@@@
             while ( *cp1 != '\0' )
             {
                cp3=cp2;
-               if (*cp1<32 || *cp1>=127 || *cp1=='<') *cp1=0;
+	       if (*cp1<32 || *cp1==127 || *cp1=='<') *cp1=0;
                else *cp2++=*cp1++;
             }
             *cp3 = '\0';
a53 9
@@@@ -1727,7 +1727,7 @@@@
 
 int isurlchar(char ch)
 {
-   if (isalnum((int)ch)) return 1;           /* allow letters, numbers...    */
+   if (isalnum((unsigned char)ch)) return 1;           /* allow letters, numbers...    */
    return (strchr(":/\\.,' *-+_@@~()[]",ch)!=NULL); /* and a few special ones */
 }
 
@


1.10
log
@Update to: 2.1.9

 o Security fix for cross-site scripting vulnerability found by
   Flavio Veloso (www.magnux.com).

 o Fixed a TOTAL_RC off by one error, which would prevent the last
   response code from being saved when using incremental mode.
@
text
@d1 11
a11 2
--- webalizer.c.orig	Mon Oct 16 23:15:53 2000
+++ webalizer.c	Thu Jun 28 12:52:50 2001
d21 19
a39 1
@@@@ -1460,19 +1460,19 @@@@
d63 1
a63 1
@@@@ -1721,7 +1721,7 @@@@
d72 1
a72 1
@@@@ -1814,7 +1814,7 @@@@
d81 1
a81 1
@@@@ -1849,7 +1849,7 @@@@
@


1.9
log
@Attached is a patch to fix a problem I noticed where webalizer
was crashing everytime it was run with -M1 and it encountered a
log entry created by Opera/5.0.  Here's an example entry just
for reference.

as6-5-2.kp.g.bonet.se - - [28/Jun/2001:03:32:35 -0500] "GET / HTTP/1.1" 200 2078 "-" "Opera/5.0 (Linux 2.4.5 i686; U)  [en]"

Submitted by:	steve
@
text
@a11 9
@@@@ -820,7 +820,7 @@@@
 		cp1=strstr(str,"Opera");  /* Netscape flavor      */
 		if (cp1!=NULL)
 		{
-		    while (*cp1!=' '&&*cp1!=' '&&*cp1!='\0') *cp2++=*cp1++;
+		    while (*cp1!='/'&&*cp1!=' '&&*cp1!='\0') *cp2++=*cp1++;
 		    while (*cp1!='.'&&*cp1!='\0') *cp2++=*cp1++;
 		    if (mangle_agent<5)
 		    {
@


1.8
log
@fix off-by-one mistake in my fix
@
text
@d1 2
a2 2
--- webalizer.c.orig	Fri Oct  6 11:59:08 2000
+++ webalizer.c	Sat Oct 14 17:17:29 2000
d12 10
a21 1
@@@@ -1459,19 +1459,19 @@@@
d45 1
a45 1
@@@@ -1720,7 +1720,7 @@@@
d54 1
a54 1
@@@@ -1813,7 +1813,7 @@@@
d63 1
a63 1
@@@@ -1848,7 +1848,7 @@@@
@


1.7
log
@ctype fixes
@
text
@d50 1
a50 1
+	 *cp2++= *cp1++;                               /* normal character   */
@


1.6
log
@Upgrade to 2.01.05
@
text
@d2 43
a44 1
+++ webalizer.c	Sun Oct  8 00:16:19 2000
d54 9
@


1.5
log
@Upgrade to 2.01.03
@
text
@d1 3
a3 3
--- webalizer.c.bak	Fri Sep 29 10:20:21 2000
+++ webalizer.c	Sat Sep 30 18:11:19 2000
@@@@ -1807,7 +1807,7 @@@@
d7 1
a7 1
-         *cp2++=tolower(*cp1++);                       /* normal character   */
d9 1
a11 1
    *cp2=0; cp2=tmpbuf;
@


1.4
log
@Upgrade to 2.01.02
@
text
@d1 3
a3 11
--- webalizer.c.orig	Wed Sep 27 20:26:30 2000
+++ webalizer.c	Thu Sep 28 17:41:01 2000
@@@@ -61,6 +61,7 @@@@
 #endif
 
 #ifdef USE_DNS
+#include <netinet/in.h>
 #include <arpa/inet.h>
 
 #ifdef HAVE_DB_185_H
@@@@ -1798,7 +1799,7 @@@@
d8 1
a8 1
+	 *cp2++= *cp1++;                       /* normal character   */
@


1.3
log
@do not lowercase search strings
@
text
@d1 2
a2 2
--- webalizer.c.orig	Sun Apr  9 05:18:56 2000
+++ webalizer.c	Fri Apr 21 23:11:15 2000
d11 1
a11 10
@@@@ -480,7 +481,7 @@@@
       else
       {
          /* Using DNS cache file <filaneme> */
-         if (verbose) printf("%s %s\n",msg_dns_usec,dns_cache);
+	 if (verbose>1) printf("%s %s\n",msg_dns_usec,dns_cache);
       }
    }
 #endif  /* USE_DNS */
@@@@ -1785,7 +1786,7 @@@@
@


1.2
log
@too verbose for DNS
@
text
@d2 1
a2 1
+++ webalizer.c	Thu Apr 20 05:46:49 2000
d20 9
@


1.1
log
@Add NO_LATEST_LINK and missing patches
@
text
@d1 2
a2 2
--- webalizer.c.bak	Tue Apr 18 07:34:50 2000
+++ webalizer.c	Tue Apr 18 07:38:58 2000
d11 9
@

