--- client_side.c.orig Sun Jun 7 22:26:37 1998 +++ client_side.c Sun Jun 7 22:27:18 1998 @@ -171,12 +171,20 @@ ICP_IDENT_SZ); xstrncpy(sent_user, clear_userandpw, ICP_IDENT_SZ); xfree(clear_userandpw); - s = strstr(sent_user, ":"); - *s = '\0'; s++; - xstrncpy(icpState->ident.ident, sent_user, ICP_IDENT_SZ); - /* we need this in authenticate.c */ - xstrncpy(icpState->ident.passwd, s, ICP_IDENT_SZ); - proxy_auth_hdr = 1; + if ((s = strstr(sent_user, ":")) != NULL) { + *s = '\0'; s++; + xstrncpy(icpState->ident.ident, sent_user, ICP_IDENT_SZ); + /* we need this in authenticate.c */ + xstrncpy(icpState->ident.passwd, s, ICP_IDENT_SZ); + proxy_auth_hdr = 1; + } else { + /* invalid Basic proxy authorization */ + s = mime_get_header(icpState->request_hdr, + "Proxy-authorization:"); + debug(33, 0, "clientAccessCheck: invalid proxy authorization header: %s\n", + s); + xstrncpy(icpState->aclChecklist->auth.basic, "-:-", ICP_IDENT_SZ); + } } } #endif /* USE_PROXY_AUTH */