From: Nick Kew Date: Sun, 16 Apr 2006 21:02:24 +0000 (+0000) Subject: Fix PR#39321 (Segfault if bad URL is specified in ProxyPass) X-Git-Tag: 2.2.2~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d307d144810c54af52f4416d640774cd95e46443;p=thirdparty%2Fapache%2Fhttpd.git Fix PR#39321 (Segfault if bad URL is specified in ProxyPass) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@394557 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index eaa3c6c8996..e15b8ecd095 100644 --- a/STATUS +++ b/STATUS @@ -74,10 +74,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * Backport fix to PR#39321 (Segfault if bad URL is specified in ProxyPass) - http://svn.apache.org/viewcvs?rev=394390&view=rev - +1: niq, rpluem, trawick - PATCHES PROPOSED TO BACKPORT FROM TRUNK: * mod_dbd: When threaded, create a private pool in child_init diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 104b465e685..33fdb2148ef 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1308,6 +1308,9 @@ PROXY_DECLARE(const char *) ap_proxy_add_worker(proxy_worker **worker, if (rv != APR_SUCCESS) { return "Unable to parse URL"; } + if (!uri.hostname || !uri.scheme) { + return "URL must be absolute!"; + } ap_str_tolower(uri.hostname); ap_str_tolower(uri.scheme);