]>
Commit | Line | Data |
---|---|---|
230f348a AM |
1 | Index: squid/include/config.h |
2 | diff -c squid/include/config.h:1.4 squid/include/config.h:1.4.2.1 | |
3 | *** squid/include/config.h:1.4 Tue Nov 13 14:27:47 2001 | |
4 | --- squid/include/config.h Sat Apr 17 19:29:51 2004 | |
5 | *************** | |
6 | *** 163,168 **** | |
7 | --- 163,169 ---- | |
8 | #define xisascii(x) isascii((unsigned char)x) | |
9 | #define xislower(x) islower((unsigned char)x) | |
10 | #define xisalpha(x) isalpha((unsigned char)x) | |
11 | + #define xisgraph(x) isgraph((unsigned char)x) | |
12 | ||
13 | #if HAVE_RANDOM | |
14 | #define squid_random random | |
15 | Index: squid/src/authenticate.c | |
16 | diff -c squid/src/authenticate.c:1.36.2.14 squid/src/authenticate.c:1.36.2.15 | |
17 | *** squid/src/authenticate.c:1.36.2.14 Wed Feb 18 11:51:16 2004 | |
18 | --- squid/src/authenticate.c Sat Apr 17 19:29:51 2004 | |
19 | *************** | |
20 | *** 94,100 **** | |
21 | /* we're configured to use this scheme - but is it active ? */ | |
22 | if ((i = authenticateAuthSchemeId(proxy_auth)) != -1) { | |
23 | authscheme_list[i].decodeauth(auth_user_request, proxy_auth); | |
24 | ! auth_user_request->auth_user->auth_module = i + 1; | |
25 | return; | |
26 | } | |
27 | } | |
28 | --- 94,104 ---- | |
29 | /* we're configured to use this scheme - but is it active ? */ | |
30 | if ((i = authenticateAuthSchemeId(proxy_auth)) != -1) { | |
31 | authscheme_list[i].decodeauth(auth_user_request, proxy_auth); | |
32 | ! if (auth_user_request->auth_user) { | |
33 | ! auth_user_request->auth_user->auth_module = i + 1; | |
34 | ! } else { | |
35 | ! debug(29, 1) ("authenticateDecodeAuth: Invalid proxy-auth header, '%s'\n", proxy_auth); | |
36 | ! } | |
37 | return; | |
38 | } | |
39 | } | |
40 | Index: squid/src/auth/basic/auth_basic.c | |
41 | diff -c squid/src/auth/basic/auth_basic.c:1.14.2.5 squid/src/auth/basic/auth_basic.c:1.14.2.6 | |
42 | *** squid/src/auth/basic/auth_basic.c:1.14.2.5 Wed Feb 18 10:50:51 2004 | |
43 | --- squid/src/auth/basic/auth_basic.c Sat Apr 17 19:29:52 2004 | |
44 | *************** | |
45 | *** 421,427 **** | |
46 | ||
47 | /* decode the username */ | |
48 | /* trim BASIC from string */ | |
49 | ! while (!xisspace(*proxy_auth)) | |
50 | proxy_auth++; | |
51 | ||
52 | local_basic.passwd = NULL; | |
53 | --- 421,427 ---- | |
54 | ||
55 | /* decode the username */ | |
56 | /* trim BASIC from string */ | |
57 | ! while (xisgraph(*proxy_auth)) | |
58 | proxy_auth++; | |
59 | ||
60 | local_basic.passwd = NULL; | |
61 | Index: squid/src/auth/digest/auth_digest.c | |
62 | diff -c squid/src/auth/digest/auth_digest.c:1.10.2.11 squid/src/auth/digest/auth_digest.c:1.10.2.12 | |
63 | *** squid/src/auth/digest/auth_digest.c:1.10.2.11 Thu Feb 19 05:28:01 2004 | |
64 | --- squid/src/auth/digest/auth_digest.c Sat Apr 17 19:29:52 2004 | |
65 | *************** | |
66 | *** 764,770 **** | |
67 | authenticateDigestDirection(auth_user_request_t * auth_user_request) | |
68 | { | |
69 | digest_request_h *digest_request = auth_user_request->scheme_data; | |
70 | ! /* null auth_user is checked for by authenticateDirection */ | |
71 | switch (digest_request->flags.credentials_ok) { | |
72 | case 0: /* not checked */ | |
73 | return -1; | |
74 | --- 764,771 ---- | |
75 | authenticateDigestDirection(auth_user_request_t * auth_user_request) | |
76 | { | |
77 | digest_request_h *digest_request = auth_user_request->scheme_data; | |
78 | ! if (!digest_request) | |
79 | ! return -2; | |
80 | switch (digest_request->flags.credentials_ok) { | |
81 | case 0: /* not checked */ | |
82 | return -1; | |
83 | *************** | |
84 | *** 790,795 **** | |
85 | --- 791,798 ---- | |
86 | if (!auth_user_request) | |
87 | return; | |
88 | digest_request = auth_user_request->scheme_data; | |
89 | + if (!digest_request) | |
90 | + return; | |
91 | /* don't add to authentication error pages */ | |
92 | if ((!accel && rep->sline.status == HTTP_PROXY_AUTHENTICATION_REQUIRED) | |
93 | || (accel && rep->sline.status == HTTP_UNAUTHORIZED)) | |
94 | *************** | |
95 | *** 1136,1142 **** | |
96 | digest_request = authDigestRequestNew(); | |
97 | ||
98 | /* trim DIGEST from string */ | |
99 | ! while (!xisspace(*proxy_auth)) | |
100 | proxy_auth++; | |
101 | ||
102 | /* Trim leading whitespace before decoding */ | |
103 | --- 1139,1145 ---- | |
104 | digest_request = authDigestRequestNew(); | |
105 | ||
106 | /* trim DIGEST from string */ | |
107 | ! while (xisgraph(*proxy_auth)) | |
108 | proxy_auth++; | |
109 | ||
110 | /* Trim leading whitespace before decoding */ | |
111 | Index: squid/src/auth/ntlm/auth_ntlm.c | |
112 | diff -c squid/src/auth/ntlm/auth_ntlm.c:1.17.2.11 squid/src/auth/ntlm/auth_ntlm.c:1.17.2.12 | |
113 | *** squid/src/auth/ntlm/auth_ntlm.c:1.17.2.11 Tue Apr 6 08:06:32 2004 | |
114 | --- squid/src/auth/ntlm/auth_ntlm.c Sat Apr 17 19:29:52 2004 | |
115 | *************** | |
116 | *** 671,677 **** | |
117 | fatal("Invalid authenticate state for NTLMStart"); | |
118 | } | |
119 | ||
120 | ! while (!xisspace(*sent_string)) /*trim NTLM */ | |
121 | sent_string++; | |
122 | ||
123 | while (xisspace(*sent_string)) /*trim leading spaces */ | |
124 | --- 671,677 ---- | |
125 | fatal("Invalid authenticate state for NTLMStart"); | |
126 | } | |
127 | ||
128 | ! while (xisgraph(*sent_string)) /*trim NTLM */ | |
129 | sent_string++; | |
130 | ||
131 | while (xisspace(*sent_string)) /*trim leading spaces */ |