From 1640c70b44a87b00caa50bcf63dea212f986a71f Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 2 Oct 2008 20:54:05 +1300 Subject: [PATCH] Add a configuration option to deny WebDAV 'PUT' on a collection. --- inc/caldav-PUT.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inc/caldav-PUT.php b/inc/caldav-PUT.php index c3859a22..8b07fda2 100644 --- a/inc/caldav-PUT.php +++ b/inc/caldav-PUT.php @@ -29,6 +29,11 @@ $lock_opener = $request->FailIfLocked(); if ( $is_collection ) { + if ( isset($c->deny_put_collection) && $c->deny_put_collection ) { + $request->DoResponse( 405 ); // Method not allowed + return; + } + /** * CalDAV does not define the result of a PUT on a collection. We treat that * as an import. The code is in caldav-PUT-functions.php