]> granicus.if.org Git - apache/commitdiff
mod_dav: Sending a MERGE request against a URI handled by mod_dav_svn with
authorGraham Leggett <minfrin@apache.org>
Sun, 26 May 2013 20:01:35 +0000 (20:01 +0000)
committerGraham Leggett <minfrin@apache.org>
Sun, 26 May 2013 20:01:35 +0000 (20:01 +0000)
the source href (sent as part of the request body as XML) pointing to a
URI that is not configured for DAV will trigger a segfault.

trunk patch: http://svn.apache.org/r1485668
Submitted by: Ben Reser <ben reser.org>
Reviewed by: minfrin, covener, jorton

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1486461 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/dav/main/mod_dav.c

diff --git a/CHANGES b/CHANGES
index 0d2d1c0470f2d0b2dd4a94698a8869a8cf3f52b0..1fa885dd8b72ac6594a39ba53414426cddd7e507 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,11 @@
 
 Changes with Apache 2.4.5
 
+  *) mod_dav: Sending a MERGE request against a URI handled by mod_dav_svn with
+     the source href (sent as part of the request body as XML) pointing to a
+     URI that is not configured for DAV will trigger a segfault. [Ben Reser
+     <ben reser.org>]
+
   *) mod_dav: Do not fail PROPPATCH when prop namespace is not known.
      PR 52559 [Diego Santa Cruz <diego.santaCruz spinetix.com>]
 
diff --git a/STATUS b/STATUS
index af4e6eb8be1d31f6dd1beb46a6136f02ba31cdd7..1e2f3a9605e25859370d2490c3aa7a23b4d2384d 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -90,13 +90,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
   
-    * mod_dav: Sending a MERGE request against a URI handled by mod_dav_svn with
-      the source href (sent as part of the request body as XML) pointing to a
-      URI that is not configured for DAV will trigger a segfault.
-      trunk patch: http://svn.apache.org/r1485668
-      2.4.x patch: trunk works, modulo CHANGES
-      +1: minfrin, covener, jorton
-
     * mod_dav: Improve error handling in dav_method_put(), add new
       dav_join_error() function.  PR 54145.
       trunk patch: http://svn.apache.org/r1464241
index 05b4669eab952223b89d085c366ef09ace932bfb..0f8886a323edf720825e7980c8e77f7a662f439e 100644 (file)
@@ -709,6 +709,12 @@ static dav_error *dav_get_resource(request_rec *r, int label_allowed,
 
     conf = ap_get_module_config(r->per_dir_config, &dav_module);
     /* assert: conf->provider != NULL */
+    if (conf->provider == NULL) {
+        return dav_new_error(r->pool, HTTP_METHOD_NOT_ALLOWED, 0, 0,
+                             apr_psprintf(r->pool,
+                                         "DAV not enabled for %s",
+                                         ap_escape_html(r->pool, r->uri)));
+    }
 
     /* resolve the resource */
     err = (*conf->provider->repos->get_resource)(r, conf->dir,
@@ -2685,11 +2691,6 @@ static int dav_method_copymove(request_rec *r, int is_move)
                                   "Destination URI had an error.");
     }
 
-    if (dav_get_provider(lookup.rnew) == NULL) {
-        return dav_error_response(r, HTTP_METHOD_NOT_ALLOWED,
-                                  "DAV not enabled for Destination URI.");
-    }
-
     /* Resolve destination resource */
     err = dav_get_resource(lookup.rnew, 0 /* label_allowed */,
                            0 /* use_checked_in */, &resnew);