You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2013/08/19 21:24:17 UTC

svn commit: r1515569 - in /httpd/httpd/branches/2.2.x: ./ CHANGES modules/dav/main/mod_dav.c

Author: jorton
Date: Mon Aug 19 19:24:16 2013
New Revision: 1515569

URL: http://svn.apache.org/r1515569
Log:
Merge 1506714 from trunk:

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

Modified:
    httpd/httpd/branches/2.2.x/   (props changed)
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.c

Propchange: httpd/httpd/branches/2.2.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1506714

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=1515569&r1=1515568&r2=1515569&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Mon Aug 19 19:24:16 2013
@@ -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>]
 

Modified: httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.c?rev=1515569&r1=1515568&r2=1515569&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.c (original)
+++ httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.c Mon Aug 19 19:24:16 2013
@@ -2724,7 +2724,7 @@ static int dav_method_copymove(request_r
      * 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_r
      */
     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,