]> granicus.if.org Git - apache/commitdiff
Merge r1506714 from trunk:
authorJim Jagielski <jim@apache.org>
Sat, 27 Jul 2013 16:16:01 +0000 (16:16 +0000)
committerJim Jagielski <jim@apache.org>
Sat, 27 Jul 2013 16:16:01 +0000 (16:16 +0000)
Fix bug #55304 with the provided patch, slightly reformatted.

In short: do not validate conditions of a COPY source's parent since
it is not modified during the operation.

* modules/dav/main/mod_dav.c:
  (dav_method_copymove): adjust params to dav_validate_request()

Submitted by: gstein
Reviewed/backported by: jim

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

STATUS
modules/dav/main/mod_dav.c

diff --git a/STATUS b/STATUS
index 0f008fdb4838b94d88b34e299a54d0c2037b022c..7e0f9c52f5586aabaed16dacc8f67ab0c09cd03d 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -100,9 +100,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
                  http://people.apache.org/~covener/patches/2.4.x-cache_err.diff
     +1: covener (I reset the votes due to the # of conflicts in the trunk revs), jailletc36, trawick
 
-  * mod_dav: Teeny patch to fix #55304
-    trunk: http://svn.apache.org/r1506714
-    +1: gstein, wrowe, trawick
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index 9135cd96067105eb66161804e0ac2ceafec07761..1c2cbb17ced34a5a581c4fcdfdacb4b9fa1f4f1f 100644 (file)
@@ -2756,7 +2756,7 @@ static int dav_method_copymove(request_rec *r, int is_move)
      * The multistatus responses will contain the information about any
      * resource that fails the validation.
      *
-     * We check the parent resource, too, since this is a MOVE. Moving the
+     * We check the parent resource, too, if this is a MOVE. Moving the
      * resource effectively removes it from the parent collection, so we
      * must ensure that we have met the appropriate conditions.
      *
@@ -2765,7 +2765,8 @@ static int dav_method_copymove(request_rec *r, int is_move)
      */
     if ((err = dav_validate_request(r, resource, depth, NULL,
                                     &multi_response,
-                                    DAV_VALIDATE_PARENT
+                                    (is_move ? DAV_VALIDATE_PARENT
+                                             : DAV_VALIDATE_RESOURCE)
                                     | DAV_VALIDATE_USE_424,
                                     NULL)) != NULL) {
         err = dav_push_error(r->pool, err->status, 0,