]> granicus.if.org Git - apache/blobdiff - modules/proxy/mod_proxy.c
Fix for additional cases of URL rewriting with ProxyPassMatch or
[apache] / modules / proxy / mod_proxy.c
index 35195f8cce219ca97ad19a8bf7b022425749a0fa..8e90c9e340ab639d3409754bbcaeaea845b90f9b 100644 (file)
@@ -655,6 +655,18 @@ static int proxy_trans(request_rec *r)
         return OK;
     }
 
+    if (strcmp(r->unparsed_uri, "*") == 0) {
+        /* "*" cannot be proxied. */
+        return DECLINED;
+    }
+
+    /* Check that the URI is valid. */
+    if (!r->uri || r->uri[0] != '/') {
+        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+                     "Invalid URI in request %s", r->the_request);
+        return HTTP_BAD_REQUEST;
+    }
+
     /* 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.