[squid-users] Digest_Ldap_Auth bug??

From: Luis Daniel Lucio Quiroz <dlucio_at_okay.com.mx>
Date: Thu, 5 Jun 2008 12:47:36 -0500

Helo Squids,
While debugin why my auth does not work I find this function with a little
pitty I'm not sure it is okay. I'm a C++ programmer. At file digest_pw_auth
(squid 3stable6) I found this function:
static void
ParseBuffer(char *buf, RequestData * requestData)
{
    char *p;
    requestData->parsed = 0;
    if ((p = strchr(buf, '\n')) != NULL)
        *p = '\0'; /* strip \n */
    if ((requestData->user = strtok(buf, "\"")) == NULL)
        return;
    if ((requestData->realm = strtok(NULL, "\"")) == NULL)
        return;
    if ((requestData->realm = strtok(NULL, "\"")) == NULL)
        return;
    requestData->parsed = -1;
}
If you read carefully request-Data->real appears twice. So char *password is
not pointed and always will be null.
I hope this could help,
Best regards
LD
Received on Thu Jun 05 2008 - 17:45:01 MDT

This archive was generated by hypermail 2.2.0 : Fri Jun 06 2008 - 12:00:03 MDT