fixes sharing to group ids with characters that are being url encoded

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2020-12-02 20:00:46 +01:00
parent 2f6b2b6fa4
commit 3ce013fa14
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
2 changed files with 2 additions and 4 deletions

View File

@ -344,10 +344,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$principals = $this->principalBackend->getGroupMembership($principalUriOriginal, true); $principals = $this->principalBackend->getGroupMembership($principalUriOriginal, true);
$principals = array_merge($principals, $this->principalBackend->getCircleMembership($principalUriOriginal)); $principals = array_merge($principals, $this->principalBackend->getCircleMembership($principalUriOriginal));
$principals = array_map(function ($principal) { $principals[] = $principalUri;
return urldecode($principal);
}, $principals);
$principals[]= $principalUri;
$fields = array_values($this->propertyMap); $fields = array_values($this->propertyMap);
$fields[] = 'a.id'; $fields[] = 'a.id';

View File

@ -107,6 +107,7 @@ class Backend {
return; return;
} }
$principal[2] = urldecode($principal[2]);
if (($principal[1] === 'users' && !$this->userManager->userExists($principal[2])) || if (($principal[1] === 'users' && !$this->userManager->userExists($principal[2])) ||
($principal[1] === 'groups' && !$this->groupManager->groupExists($principal[2]))) { ($principal[1] === 'groups' && !$this->groupManager->groupExists($principal[2]))) {
// User or group does not exist // User or group does not exist