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 2026/01/08 13:26:41 UTC

svn commit: r1931184 - httpd/httpd/trunk/modules/dav/main

Author: jorton
Date: Thu Jan  8 13:26:41 2026
New Revision: 1931184

Log:
* modules/dav/main/ms_wdv.c (mswdv_combined_proppatch): Drop redundant
  check of proppatch_len against APR_SIZE_MAX, update comment.

Modified:
   httpd/httpd/trunk/modules/dav/main/ms_wdv.c

Modified: httpd/httpd/trunk/modules/dav/main/ms_wdv.c
==============================================================================
--- httpd/httpd/trunk/modules/dav/main/ms_wdv.c	Thu Jan  8 12:45:03 2026	(r1931183)
+++ httpd/httpd/trunk/modules/dav/main/ms_wdv.c	Thu Jan  8 13:26:41 2026	(r1931184)
@@ -619,15 +619,17 @@ static dav_error *mswdv_combined_proppat
         return dav_new_error(r->pool, HTTP_BAD_REQUEST, 0, status,
                              "Bad PROPPATCH part length");
 
-    /* Validate PROPPATCH length against configured limits */
+    /* Validate PROPPATCH length against configured limits. Note
+     * ap_get_limit_xml_body() has a maximum of AP_MAX_LIMIT_XML_BODY
+     * giving a safe upper bound to in-memory caching. */
     limit = ap_get_limit_xml_body(r);
     if (limit > 0 && proppatch_len > limit) {
         return dav_new_error(r->pool, HTTP_REQUEST_ENTITY_TOO_LARGE, 0, 0,
                              "PROPPATCH part length exceeds configured limit");
     }
-    if (proppatch_len <= 0 || proppatch_len > (apr_off_t)APR_SIZE_MAX) {
-        return dav_new_error(r->pool, HTTP_REQUEST_ENTITY_TOO_LARGE, 0, 0,
-                             "PROPPATCH part length invalid or too large");
+    if (proppatch_len <= 0) {
+        return dav_new_error(r->pool, HTTP_BAD_REQUEST, 0, 0,
+                             "invalid or negative PROPPATCH part length");
     }
 
     apr_brigade_destroy(bb);