mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Disable listening, instead checking the ACL to prevent DoS
This commit is contained in:
parent
f3edf2799c
commit
8a1cbaa014
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user