cvs commit: apache-1.3/src/modules/standard mod_digest.c mod_rewrite.c mod_speling.c
fanf00/01/12 07:23:29 Modified:src/modules/experimental mod_auth_digest.c src/modules/standard mod_digest.c mod_rewrite.c mod_speling.c Log: Don't convert auth to proxy auth when it shouldn't be. Revision ChangesPath 1.13 +9 -8 apache-1.3/src/modules/experimental/mod_auth_digest.c Index: mod_auth_digest.c === RCS file: /home/cvs/apache-1.3/src/modules/experimental/mod_auth_digest.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- mod_auth_digest.c 1999/12/09 05:21:00 1.12 +++ mod_auth_digest.c 2000/01/12 15:23:23 1.13 @@ -826,14 +826,14 @@ /* Parse the Authorization header, if it exists */ static int get_digest_rec(request_rec *r, digest_header_rec *resp) { -const char *auth_line = ap_table_get(r->headers_in, - r->proxyreq ? "Proxy-Authorization" - : "Authorization"); +const char *auth_line; size_t l; int vk = 0, vv = 0; char *key, *value; - +auth_line = ap_table_get(r->headers_in, + r->proxyreq == STD_PROXY ? "Proxy-Authorization" + : "Authorization"); if (!auth_line) { resp->auth_hdr_sts = NO_HEADER; return !OK; @@ -1270,7 +1270,7 @@ * unneccessarily (it's usually > 200 bytes!). */ -if (r->proxyreq) +if (r->proxyreq != NOT_PROXY) domain = NULL; /* don't send domain for proxy requests */ else if (conf->uri_list) domain = conf->uri_list; @@ -1285,7 +1285,8 @@ } ap_table_mergen(r->err_headers_out, - r->proxyreq ? "Proxy-Authenticate" : "WWW-Authenticate", + r->proxyreq == STD_PROXY ? "Proxy-Authenticate" + : "WWW-Authenticate", ap_psprintf(r->pool, "Digest realm=\"%s\", nonce=\"%s\", " "algorithm=%s%s%s%s%s", ap_auth_name(r), nonce, conf->algorithm, @@ -1986,8 +1987,8 @@ if (ai && ai[0]) ap_table_mergen(r->headers_out, - r->proxyreq ? "Proxy-Authentication-Info" : - "Authentication-Info", + r->proxyreq == STD_PROXY ? "Proxy-Authentication-Info" + : "Authentication-Info", ai); return OK; } 1.43 +4 -3 apache-1.3/src/modules/standard/mod_digest.c Index: mod_digest.c === RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_digest.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- mod_digest.c 1999/10/21 20:45:24 1.42 +++ mod_digest.c 2000/01/12 15:23:24 1.43 @@ -136,9 +136,7 @@ static int get_digest_rec(request_rec *r, digest_header_rec * response) { -const char *auth_line = ap_table_get(r->headers_in, -r->proxyreq ? "Proxy-Authorization" -: "Authorization"); +const char *auth_line; int l; int s, vk = 0, vv = 0; const char *t; @@ -154,6 +152,9 @@ return SERVER_ERROR; } +auth_line = ap_table_get(r->headers_in, + r->proxyreq == STD_PROXY ? "Proxy-Authorization" + : "Authorization"); if (!auth_line) { ap_note_digest_auth_failure(r); return AUTH_REQUIRED; 1.154 +2 -2 apache-1.3/src/modules/standard/mod_rewrite.c Index: mod_rewrite.c === RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v retrieving revision 1.153 retrieving revision 1.154 diff -u -r1.153 -r1.154 --- mod_rewrite.c 1999/12/04 11:43:17 1.153 +++ mod_rewrite.c 2000/01/12 15:23:25 1.154 @@ -1123,7 +1123,7 @@ } /* now make sure the request gets handled by the proxy handler */ -r->proxyreq = 1; +r->proxyreq = STD_PROXY; r->handler = "proxy-server"; rewritelog(r, 1, "go-ahead with proxy request %s [OK]", @@ -1387,7 +1387,7 @@ } /* now make sure the request gets handled by the proxy handler */ -r->proxyreq = 1; +r->proxyreq = STD_PROXY; r->handler = "proxy-server"; rewritelog(r, 1, "[per-dir %s] go-ahead with proxy request " 1.35 +1 -1 apache-1.3/src/
cvs commit: apache-1.3/src/modules/standard mod_digest.c
coar98/10/03 08:31:59 Modified:src/modules/standard mod_digest.c Log: Fix another potentially troublesome LWSP==SP assumption. Revision ChangesPath 1.40 +2 -2 apache-1.3/src/modules/standard/mod_digest.c Index: mod_digest.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_digest.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- mod_digest.c 1998/08/09 21:03:25 1.39 +++ mod_digest.c 1998/10/03 15:31:59 1.40 @@ -159,7 +159,7 @@ return AUTH_REQUIRED; } -if (strcasecmp(scheme=ap_getword(r->pool, &auth_line, ' '), "Digest")) { +if (strcasecmp(scheme = ap_getword_white(r->pool, &auth_line), "Digest")) { /* Client tried to authenticate using wrong auth scheme */ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, "client used wrong authentication scheme: %s for %s", @@ -345,7 +345,7 @@ method_restricted = 1; t = reqs[x].requirement; - w = ap_getword(r->pool, &t, ' '); + w = ap_getword_white(r->pool, &t); if (!strcmp(w, "valid-user")) return OK; else if (!strcmp(w, "user")) {
cvs commit: apache-1.3/src/modules/standard mod_digest.c
marc98/08/09 14:03:25 Modified:src/modules/standard mod_digest.c Log: Wrap line properly for 80 cols. Revision ChangesPath 1.39 +2 -1 apache-1.3/src/modules/standard/mod_digest.c Index: mod_digest.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_digest.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- mod_digest.c 1998/08/09 12:34:17 1.38 +++ mod_digest.c 1998/08/09 21:03:25 1.39 @@ -162,7 +162,8 @@ if (strcasecmp(scheme=ap_getword(r->pool, &auth_line, ' '), "Digest")) { /* Client tried to authenticate using wrong auth scheme */ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, - "client used wrong authentication scheme: %s for %s", scheme, r->uri); + "client used wrong authentication scheme: %s for %s", + scheme, r->uri); ap_note_digest_auth_failure(r); return AUTH_REQUIRED; }
cvs commit: apache-1.3/src/modules/standard mod_digest.c
ben 98/08/09 05:34:18 Modified:src/modules/standard mod_digest.c Log: Improve logging. Revision ChangesPath 1.38 +4 -3 apache-1.3/src/modules/standard/mod_digest.c Index: mod_digest.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_digest.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- mod_digest.c 1998/08/06 17:30:57 1.37 +++ mod_digest.c 1998/08/09 12:34:17 1.38 @@ -143,6 +143,7 @@ int s, vk = 0, vv = 0; const char *t; char *key, *value; +const char *scheme; if (!(t = ap_auth_type(r)) || strcasecmp(t, "Digest")) return DECLINED; @@ -158,10 +159,10 @@ return AUTH_REQUIRED; } -if (strcasecmp(ap_getword(r->pool, &auth_line, ' '), "Digest")) { +if (strcasecmp(scheme=ap_getword(r->pool, &auth_line, ' '), "Digest")) { /* Client tried to authenticate using wrong auth scheme */ - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r, - "client used wrong authentication scheme: %s", r->uri); + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, + "client used wrong authentication scheme: %s for %s", scheme, r->uri); ap_note_digest_auth_failure(r); return AUTH_REQUIRED; }
cvs commit: apache-1.3/src/modules/standard mod_digest.c
rse 98/03/30 00:06:51 Modified:src/modules/standard mod_digest.c Log: remove comment: relict from mod_auth Revision ChangesPath 1.32 +0 -1 apache-1.3/src/modules/standard/mod_digest.c Index: mod_digest.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_digest.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- mod_digest.c 1998/03/13 19:20:33 1.31 +++ mod_digest.c 1998/03/30 08:06:50 1.32 @@ -297,7 +297,6 @@ note_digest_auth_failure(r); return AUTH_REQUIRED; } -/* anyone know where the prototype for crypt is? */ if (strcmp(response->digest, find_digest(r, response, a1))) { aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, "user %s: password mismatch: %s", c->user, r->uri);