--- httpd-2.0.46/modules/dav/main/mod_dav.c.davbadfrag +++ httpd-2.0.46/modules/dav/main/mod_dav.c @@ -4537,6 +4537,16 @@ if (strcmp(r->handler, DAV_HANDLER_NAME) != 0) return DECLINED; + /* Reject requests with an unescaped hash character, as these may + * be more destructive than the user intended. */ + if (r->parsed_uri.fragment != NULL) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + "buggy client used un-escaped hash in Request-URI"); + return dav_error_response(r, HTTP_BAD_REQUEST, + "The request was invalid: the URI included " + "an un-escaped hash character"); + } + /* ### do we need to do anything with r->proxyreq ?? */ /*