]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_dav: Do not fail PROPPATCH when prop namespace is not known.
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 27 Jun 2013 17:16:56 +0000 (17:16 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 27 Jun 2013 17:16:56 +0000 (17:16 +0000)
PR: 52559
Backports: r1476644
Submitted by: Diego Santa Cruz <diego.santaCruz spinetix.com>
Reviewed by: minfrin, wrowe, rjung

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

CHANGES
STATUS
modules/dav/fs/dbm.c

diff --git a/CHANGES b/CHANGES
index d8f3ce459f440fba1152ac4944c154650325abaa..cee983c249f700c7a5204829e2d0da62dbf5b7e1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -51,6 +51,9 @@ Changes with Apache 2.2.25
      namespace httpd segfaults. PR 52559 [Diego Santa Cruz
      <diego.santaCruz spinetix.com>]
 
+  *) mod_dav: Do not fail PROPPATCH when prop namespace is not known.
+     PR 52559 [Diego Santa Cruz <diego.santaCruz spinetix.com>]
+
 Changes with Apache 2.2.24
 
   *) SECURITY: CVE-2012-3499 (cve.mitre.org)
diff --git a/STATUS b/STATUS
index dc8a4ffbd739a705c3fafb577502215f8f336cce..affca73ef1a7e9e8bce6e4d8f6589b82e8934080 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -96,13 +96,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
   
-  * mod_dav: Do not fail PROPPATCH when prop namespace is not known. PR 52559
-    [Diego Santa Cruz <diego.santaCruz spinetix.com>]
-    trunk patch: http://svn.apache.org/r1476644
-    2.4.x patch: http://svn.apache.org/r1486459
-    2.2.x patch: trunk patch works (minus CHANGES)
-    +1: minfrin, wrowe, rjung
-
   * mod_dav: Do not segfault on PROPFIND with a zero length DBM. PR 52559
     [Diego Santa Cruz <diego.santaCruz spinetix.com>]
     This is the third patch in PR 52559. The other two are already
index 040c3e3d6fc9fad6a11c32b2729856422ff0d3b6..ec421056ce6098b6e8a1ddb62f21794f0e2d1c7d 100644 (file)
@@ -191,7 +191,15 @@ void dav_dbm_close(dav_db *db)
 
 dav_error * dav_dbm_fetch(dav_db *db, apr_datum_t key, apr_datum_t *pvalue)
 {
-    apr_status_t status = apr_dbm_fetch(db->file, key, pvalue);
+    apr_status_t status;
+
+    if (!key.dptr) {
+        /* no key could be created (namespace not known) => no value */
+        memset(pvalue, 0, sizeof(*pvalue));
+        status = APR_SUCCESS;
+    } else {
+        status = apr_dbm_fetch(db->file, key, pvalue);
+    }
 
     return dav_fs_dbm_error(db, NULL, status);
 }