(!strcasecmp(ChrPtr(Hdr->c_password), ChrPtr(sptr->wc_password))) ) {
TheSession = sptr;
}
+ if (TheSession == NULL)
+ lprintf(1, "found sessionkey [%ld], but credentials for [%s|%s] didn't match\n",
+ Hdr->HR.SessionKey,ChrPtr(Hdr->c_username), ChrPtr(sptr->wc_username));
break;
case AUTH_COOKIE:
/* If cookie-session, look for a session with matching session ID */
}
}
pthread_mutex_unlock(ListMutex);
+ if (TheSession == NULL)
+ lprintf(1, "didn't find sessionkey [%ld] for user [%s]\n",
+ Hdr->HR.SessionKey,ChrPtr(Hdr->c_username));
return TheSession;
}
break;
} while (1);
/* remove the handlername from the URL */
- if (Pos != NULL) {
+ if ((Pos != NULL) && (Pos != StrBufNOTNULL)){
StrBufCutLeft(Hdr->HR.ReqLine,
Pos - ChrPtr(Hdr->HR.ReqLine));
}