if(testvaliduserchar(user))
continue;
- #if 0
- if((str = strstr(user,"%20")) != NULL) {
- /*
- This is a patch introduced to solve bug #1624251 reported at sourceforge but
- the side effect is to truncate the name at the first space and merge the reports
- of people whose name is identical up to the first space.
-
- The old code used to truncate the user name at the first % if a %20 was
- found anywhere in the string. That means the string could be truncated
- at the wrong place if another % occured before the %20. This new code should
- avoid that problem and only truncate at the space. There is no bug
- report indicating that anybody noticed this.
- */
- *str='\0';
- }
-
- /*
- Code prior to 2.2.7 used to replace any %xx by a dot as long as a %5c was
- found in the user name.
- */
- while((str = strstr(user,"%5c")) != NULL) {
- *str='.';
- for (x=3 ; str[x] ; x++) str[x-2]=str[x];
- }
- #endif
// replace any tab by a single space
for (str=full_url ; *str ; str++)
if (*str=='\t') *str=' ';
strftime(dia, sizeof(dia), "%d/%m/%Y", log_entry.EntryTime);
strftime(hora,sizeof(hora),"%H:%M:%S",log_entry.EntryTime);
- /*if ( strcmp ( user , sz_Last_User ) != 0 ) {
- if ( fp_Write_User )
- fclose( fp_Write_User ) ;
- sprintf (tmp3, "%s/%s.unsort", tmp, user);
-
- if ((fp_Write_User = MY_FOPEN (tmp3, "a")) == NULL) {
- fprintf (stderr, "%s: (log) %s: %s - %s\n", argv[0], _("Cannot open temporary file"), tmp3, strerror(errno));
- exit (1);
- }
- strcpy( sz_Last_User , user ) ;
- }*/
if (fprintf(ufile->file, "%s\t%s\t%s\t%s\t%ld\t%s\t%ld\t%s\n",dia,hora,log_entry.Ip,url,nbytes,code,elap_time,smartfilter)<=0) {
debuga(_("Write error in the log file of user %s\n"),user);
exit(EXIT_FAILURE);