From 1186977589efc4e0d5b78f0024e6eaddffe39f6b 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 84294971b4..0cff119b1b 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -345,9 +345,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 979eb39135..9dbbc2f397 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