Subversion Repositories wimsdev

Rev

Rev 15546 | Rev 16647 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15546 Rev 15547
Line 312... Line 312...
312
/* log posted data */
312
/* log posted data */
313
void post_log(void)
313
void post_log(void)
314
{
314
{
315
  char *h, *l, logstr[2*MAX_LINELEN+2];
315
  char *h, *l, logstr[2*MAX_LINELEN+2];
316
  char *authpwd, *p, *ll, *l1 ;
316
  char *authpwd, *p, *ll, *l1 ;
317
  static char *obliterate[]={"auth_password=","passwd="};
317
  static char *obliterate[]={"auth_password=","passwd=","passsup=","password="};
318
  int i, oblicnt=sizeof(obliterate)/sizeof(char*);;
318
  int i, oblicnt=sizeof(obliterate)/sizeof(char*);;
319
 
319
 
320
  h=remote_addr;
320
  h=remote_addr;
321
  if(mpboundary[0]!=0) l="multipart/form-data"; else l=stdinbuf;
321
  if(mpboundary[0]!=0) l="multipart/form-data"; else l=stdinbuf;
322
 
322
 
Line 325... Line 325...
325
    authpwd=obliterate[i];
325
    authpwd=obliterate[i];
326
    if((p=strstr(ll,authpwd))!=NULL ) {
326
    if((p=strstr(ll,authpwd))!=NULL ) {
327
      l1=strdup(ll);
327
      l1=strdup(ll);
328
      mystrncpy(ll,l1,p-ll+strlen(authpwd)+1);
328
      mystrncpy(ll,l1,p-ll+strlen(authpwd)+1);
329
      strcat(ll,"xxxx");
329
      strcat(ll,"xxxx");
330
      mystrncpy(l1,p+strlen(authpwd),strlen(l));
330
      l1+=(p-ll)+strlen(authpwd);
331
      if((p=strstr(l1,"&"))!=NULL) strcat(ll,p);
331
      if((p=strstr(l1,"&"))!=NULL) strcat(ll,p);
332
    }
332
    }
333
  }
333
  }
334
  snprintf(logstr,sizeof(logstr),"%s %s\t%s",
334
  snprintf(logstr,sizeof(logstr),"%s %s\t%s",
335
     nowstr, h, ll);
335
     nowstr, h, ll);