From 8a1cbaa01444405efddfb20bcf18b1de9a4dd30f Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Fri, 10 Aug 2012 22:18:08 +0200 Subject: [PATCH] Disable listening, instead checking the ACL to prevent DoS --- appinfo/remote.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/appinfo/remote.php b/appinfo/remote.php index a095f0f3..011938e2 100644 --- a/appinfo/remote.php +++ b/appinfo/remote.php @@ -36,19 +36,16 @@ $principalBackend = new OC_Connector_Sabre_Principal(); $carddavBackend = new OC_Connector_Sabre_CardDAV(); // Root nodes -$nodes = array( - new Sabre_CalDAV_Principal_Collection($principalBackend), +$collection = new Sabre_CalDAV_Principal_Collection($principalBackend); $collection->disableListing = true; // Disable listening +$nodes = array( + $collection, new Sabre_CardDAV_AddressBookRoot($principalBackend, $carddavBackend), -); + ); // Fire up server - $server = new Sabre_DAV_Server($nodes); $server->setBaseUri($baseuri); // Add plugins -$aclPlugin = new Sabre_DAVACL_Plugin(); -$aclPlugin->hideNodesFromListings = true; -$server->addPlugin($aclPlugin); $server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend, 'ownCloud')); $server->addPlugin(new Sabre_CardDAV_Plugin()); $server->addPlugin(new Sabre_DAVACL_Plugin());