From 5379273b063be1c78d1bb78521f1ec8ddb152759 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 2 Dec 2020 20:00:46 +0100 Subject: [PATCH] fixes sharing to group ids with characters that are being url encoded Signed-off-by: Arthur Schiwon --- apps/dav/lib/CalDAV/CalDavBackend.php | 3 --- apps/dav/lib/DAV/Sharing/Backend.php | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index d35ba75c1c..b899fa85ff 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -307,9 +307,6 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $principals = $this->principalBackend->getGroupMembership($principalUriOriginal, true); $principals = array_merge($principals, $this->principalBackend->getCircleMembership($principalUriOriginal)); - $principals = array_map(function ($principal) { - return urldecode($principal); - }, $principals); $principals[]= $principalUri; $fields = array_values($this->propertyMap); diff --git a/apps/dav/lib/DAV/Sharing/Backend.php b/apps/dav/lib/DAV/Sharing/Backend.php index 2f8fb0c310..c77e90b961 100644 --- a/apps/dav/lib/DAV/Sharing/Backend.php +++ b/apps/dav/lib/DAV/Sharing/Backend.php @@ -107,6 +107,7 @@ class Backend { return; } + $principal[2] = urldecode($principal[2]); if (($principal[1] === 'users' && !$this->userManager->userExists($principal[2])) || ($principal[1] === 'groups' && !$this->groupManager->groupExists($principal[2]))) { // User or group does not exist