]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* modules/dav/fs/repos.c (dav_fs_method_precondition):
authorJoe Orton <jorton@apache.org>
Fri, 2 May 2025 15:47:09 +0000 (15:47 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 2 May 2025 15:47:09 +0000 (15:47 +0000)
  Fix crashes when mod_dav_fs is not configured.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1925371 13f79535-47bb-0310-9956-ffa450edef68

modules/dav/fs/repos.c

index 45412f18ecc75323b9850a292b9abe113f2e6ac8..5ef59177588123b53ccd9556bc069431b11f6d2d 100644 (file)
@@ -2341,6 +2341,11 @@ int dav_fs_method_precondition(request_rec *r,
 {
     int ret = DECLINED;
 
+    if ((src && src->hooks != &dav_hooks_repository_fs)
+        || (dst && dst->hooks != &dav_hooks_repository_fs)) {
+        return ret;
+    }
+
     switch (r->method_number) {
     case M_COPY: /* FALLTHROUGH */
     case M_MOVE: /* FALLTHROUGH */