]> granicus.if.org Git - apache/commitdiff
Fix bug #55304 with the provided patch, slightly reformatted.
authorGreg Stein <gstein@apache.org>
Wed, 24 Jul 2013 21:09:38 +0000 (21:09 +0000)
committerGreg Stein <gstein@apache.org>
Wed, 24 Jul 2013 21:09:38 +0000 (21:09 +0000)
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()

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1506714 13f79535-47bb-0310-9956-ffa450edef68

modules/dav/main/mod_dav.c

index 2e040a71907edf27ef55574ca842642934e3555b..ae5291a86d29c69219388769e5609659e77f6d23 100644 (file)
@@ -2763,7 +2763,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.
      *
@@ -2772,7 +2772,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,