File httpd-2.4.6-mod_dav-bnc864308-1-parent_validation.patch of Package apache2.openSUSE_13.1_Update
From: Greg Stein <gstein@gmail.com>
Date: Wed, 24 Jul 2013 22:09:38 +0100
Subject: [PATCH] mod_dav should not validate parent when handling COPY
References: bnc#864308 https://issues.apache.org/bugzilla/show_bug.cgi?id=55304 http://svn.apache.org/viewvc?view=revision&revision=1506714
Upstream: committed
Apache httpd in openSUSE 13.1 is 2.4.6. The mod_dav in this version is
problematic for Apache Subversion, the Apache httpd version will be blacklisted
in future 1.8.x releases of svn and 1.9.
This patch fixes parent validation when handling COPY.
------------------------------------------------------------------------
r1506714 | gstein | 2013-07-24 22:09:38 +0100 (Wed, 24 Jul 2013) | 8 lines
Changed paths:
M /httpd/httpd/trunk/modules/dav/main/mod_dav.c
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()
------------------------------------------------------------------------
Index: trunk/modules/dav/main/mod_dav.c
===================================================================
--- trunk/modules/dav/main/mod_dav.c (revision 1506713)
+++ trunk/modules/dav/main/mod_dav.c (revision 1506714)
@@ -2763,7 +2763,7 @@
* 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 @@
*/
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,