
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2011-4317

--- httpd-2.2.15/modules/mappers/mod_rewrite.c.cve4317
+++ httpd-2.2.15/modules/mappers/mod_rewrite.c
@@ -4257,6 +4257,11 @@ static int hook_uri2file(request_rec *r)
         return DECLINED;
     }
 
+    if ((r->unparsed_uri[0] == '*' && r->unparsed_uri[1] == '\0')
+        || !r->uri || r->uri[0] != '/') {
+        return DECLINED;
+    }
+
     /*
      *  add the SCRIPT_URL variable to the env. this is a bit complicated
      *  due to the fact that apache uses subrequests and internal redirects
--- httpd-2.2.15/modules/proxy/mod_proxy.c.cve4317
+++ httpd-2.2.15/modules/proxy/mod_proxy.c
@@ -544,6 +544,11 @@ static int proxy_trans(request_rec *r)
         return OK;
     }
 
+    if ((r->unparsed_uri[0] == '*' && r->unparsed_uri[1] == '\0')
+        || !r->uri || r->uri[0] != '/') {
+        return DECLINED;
+    }
+
     /* XXX: since r->uri has been manipulated already we're not really
      * compliant with RFC1945 at this point.  But this probably isn't
      * an issue because this is a hybrid proxy/origin server.
