]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge 1506714 from trunk:
authorJoe Orton <jorton@apache.org>
Mon, 19 Aug 2013 19:24:16 +0000 (19:24 +0000)
committerJoe Orton <jorton@apache.org>
Mon, 19 Aug 2013 19:24:16 +0000 (19:24 +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()

PR: 55304
Submitted by: breser
Reviewed by: gstein, wrowe, rpluem

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

CHANGES
modules/dav/main/mod_dav.c

diff --git a/CHANGES b/CHANGES
index 0a507427f8d2d50b181897e24ce620f41f388103..bcf34e3e37bd845fe3606be42cbea9181acb9fe2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.26
 
+  *) mod_dav: Do not validate locks against parent collection of COPY
+     source URI.  PR 55304.  [Ben Reser]
+
   *) mod_ssl: Check SNI hostname against Host header case-insensitively.
      PR 49491.  [Mayank Agrawal <magrawal.08 gmail.com>]
 
index 05d19028d313036a6c6cdea06ec6bdfc1c6c7076..b15185f911db0a8b5ff8dd54054e3fccb97ed1fe 100644 (file)
@@ -2724,7 +2724,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.
      *
@@ -2733,7 +2733,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,