From: Jeff Trawick Date: Sun, 11 Sep 2005 13:14:58 +0000 (+0000) Subject: backport from trunk: X-Git-Tag: 2.0.55~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af946098a1123433f93cf692affdb495345c4bf3;p=thirdparty%2Fapache%2Fhttpd.git backport from trunk: mod_auth_digest: Fix hostinfo validation for CONNECT requests. Submitted by: jorton Reviewed by: nd, jerenkrantz git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@280126 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index 8b105e0e117..602b1730fb6 100644 --- a/STATUS +++ b/STATUS @@ -189,10 +189,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: modules/proxy/mod_proxy_ftp.c: r231044 +1: minfrin, jim, nd - *) mod_auth_digest: Fix hostinfo validation for CONNECT requests. - http://svn.apache.org/viewcvs.cgi?rev=193127&view=rev - +1: jorton, nd, jerenkrantz - *) mod_version: New Module, Backport from trunk. Requires Minor MMN Bump. http://svn.apache.org/repos/asf/httpd/httpd/branches/mod_version_for_2.0.x +1: pquerna, nd, wrowe diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c index 137ca0c5995..be107b94ed7 100644 --- a/modules/aaa/mod_auth_digest.c +++ b/modules/aaa/mod_auth_digest.c @@ -1504,6 +1504,8 @@ static void copy_uri_components(apr_uri_t *dst, else { dst->query = src->query; } + + dst->hostinfo = src->hostinfo; } /* These functions return 0 if client is OK, and proper error status @@ -1631,7 +1633,7 @@ static int authenticate_digest_user(request_rec *r) } if (r->method_number == M_CONNECT) { - if (strcmp(resp->uri, r_uri.hostinfo)) { + if (!r_uri.hostinfo || strcmp(resp->uri, r_uri.hostinfo)) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "Digest: uri mismatch - <%s> does not match " "request-uri <%s>", resp->uri, r_uri.hostinfo);