From d884370844c7f807b10aa09e63cb814927011572 Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Sat, 3 Sep 2016 10:52:05 +0200 Subject: Use true random string as uri for public calendars - as a result we can no longer return the pre-publish-url --- apps/dav/lib/RootCollection.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps/dav/lib/RootCollection.php') diff --git a/apps/dav/lib/RootCollection.php b/apps/dav/lib/RootCollection.php index f99d5850212..4c76dc30c3f 100644 --- a/apps/dav/lib/RootCollection.php +++ b/apps/dav/lib/RootCollection.php @@ -39,10 +39,12 @@ class RootCollection extends SimpleCollection { public function __construct() { $config = \OC::$server->getConfig(); + $random = \OC::$server->getSecureRandom(); + $userManager = \OC::$server->getUserManager(); $db = \OC::$server->getDatabaseConnection(); $dispatcher = \OC::$server->getEventDispatcher(); $userPrincipalBackend = new Principal( - \OC::$server->getUserManager(), + $userManager, \OC::$server->getGroupManager() ); $groupPrincipalBackend = new GroupPrincipalBackend( @@ -60,7 +62,7 @@ class RootCollection extends SimpleCollection { $systemPrincipals->disableListing = $disableListing; $filesCollection = new Files\RootCollection($userPrincipalBackend, 'principals/users'); $filesCollection->disableListing = $disableListing; - $caldavBackend = new CalDavBackend($db, $userPrincipalBackend, \OC::$server->getUserManager(), $config); + $caldavBackend = new CalDavBackend($db, $userPrincipalBackend, $userManager, $config, $random); $calendarRoot = new CalendarRoot($userPrincipalBackend, $caldavBackend, 'principals/users'); $calendarRoot->disableListing = $disableListing; $publicCalendarRoot = new PublicCalendarRoot($caldavBackend); -- cgit v1.2.3