Index: squid/include/config.h diff -c squid/include/config.h:1.4 squid/include/config.h:1.4.2.1 *** squid/include/config.h:1.4 Tue Nov 13 14:27:47 2001 --- squid/include/config.h Sat Apr 17 19:29:51 2004 *************** *** 163,168 **** --- 163,169 ---- #define xisascii(x) isascii((unsigned char)x) #define xislower(x) islower((unsigned char)x) #define xisalpha(x) isalpha((unsigned char)x) + #define xisgraph(x) isgraph((unsigned char)x) #if HAVE_RANDOM #define squid_random random Index: squid/src/authenticate.c diff -c squid/src/authenticate.c:1.36.2.14 squid/src/authenticate.c:1.36.2.15 *** squid/src/authenticate.c:1.36.2.14 Wed Feb 18 11:51:16 2004 --- squid/src/authenticate.c Sat Apr 17 19:29:51 2004 *************** *** 94,100 **** /* we're configured to use this scheme - but is it active ? */ if ((i = authenticateAuthSchemeId(proxy_auth)) != -1) { authscheme_list[i].decodeauth(auth_user_request, proxy_auth); ! auth_user_request->auth_user->auth_module = i + 1; return; } } --- 94,104 ---- /* we're configured to use this scheme - but is it active ? */ if ((i = authenticateAuthSchemeId(proxy_auth)) != -1) { authscheme_list[i].decodeauth(auth_user_request, proxy_auth); ! if (auth_user_request->auth_user) { ! auth_user_request->auth_user->auth_module = i + 1; ! } else { ! debug(29, 1) ("authenticateDecodeAuth: Invalid proxy-auth header, '%s'\n", proxy_auth); ! } return; } } Index: squid/src/auth/basic/auth_basic.c diff -c squid/src/auth/basic/auth_basic.c:1.14.2.5 squid/src/auth/basic/auth_basic.c:1.14.2.6 *** squid/src/auth/basic/auth_basic.c:1.14.2.5 Wed Feb 18 10:50:51 2004 --- squid/src/auth/basic/auth_basic.c Sat Apr 17 19:29:52 2004 *************** *** 421,427 **** /* decode the username */ /* trim BASIC from string */ ! while (!xisspace(*proxy_auth)) proxy_auth++; local_basic.passwd = NULL; --- 421,427 ---- /* decode the username */ /* trim BASIC from string */ ! while (xisgraph(*proxy_auth)) proxy_auth++; local_basic.passwd = NULL; Index: squid/src/auth/digest/auth_digest.c diff -c squid/src/auth/digest/auth_digest.c:1.10.2.11 squid/src/auth/digest/auth_digest.c:1.10.2.12 *** squid/src/auth/digest/auth_digest.c:1.10.2.11 Thu Feb 19 05:28:01 2004 --- squid/src/auth/digest/auth_digest.c Sat Apr 17 19:29:52 2004 *************** *** 764,770 **** authenticateDigestDirection(auth_user_request_t * auth_user_request) { digest_request_h *digest_request = auth_user_request->scheme_data; ! /* null auth_user is checked for by authenticateDirection */ switch (digest_request->flags.credentials_ok) { case 0: /* not checked */ return -1; --- 764,771 ---- authenticateDigestDirection(auth_user_request_t * auth_user_request) { digest_request_h *digest_request = auth_user_request->scheme_data; ! if (!digest_request) ! return -2; switch (digest_request->flags.credentials_ok) { case 0: /* not checked */ return -1; *************** *** 790,795 **** --- 791,798 ---- if (!auth_user_request) return; digest_request = auth_user_request->scheme_data; + if (!digest_request) + return; /* don't add to authentication error pages */ if ((!accel && rep->sline.status == HTTP_PROXY_AUTHENTICATION_REQUIRED) || (accel && rep->sline.status == HTTP_UNAUTHORIZED)) *************** *** 1136,1142 **** digest_request = authDigestRequestNew(); /* trim DIGEST from string */ ! while (!xisspace(*proxy_auth)) proxy_auth++; /* Trim leading whitespace before decoding */ --- 1139,1145 ---- digest_request = authDigestRequestNew(); /* trim DIGEST from string */ ! while (xisgraph(*proxy_auth)) proxy_auth++; /* Trim leading whitespace before decoding */ Index: squid/src/auth/ntlm/auth_ntlm.c diff -c squid/src/auth/ntlm/auth_ntlm.c:1.17.2.11 squid/src/auth/ntlm/auth_ntlm.c:1.17.2.12 *** squid/src/auth/ntlm/auth_ntlm.c:1.17.2.11 Tue Apr 6 08:06:32 2004 --- squid/src/auth/ntlm/auth_ntlm.c Sat Apr 17 19:29:52 2004 *************** *** 671,677 **** fatal("Invalid authenticate state for NTLMStart"); } ! while (!xisspace(*sent_string)) /*trim NTLM */ sent_string++; while (xisspace(*sent_string)) /*trim leading spaces */ --- 671,677 ---- fatal("Invalid authenticate state for NTLMStart"); } ! while (xisgraph(*sent_string)) /*trim NTLM */ sent_string++; while (xisspace(*sent_string)) /*trim leading spaces */