Merge pull request #24762 from nextcloud/backport/24515/stable19
[stable19] fixes sharing to group ids with characters that are being url encoded
This commit is contained in:
commit
1dc3f0f48e
|
@ -307,9 +307,6 @@ 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) {
|
|
||||||
return urldecode($principal);
|
|
||||||
}, $principals);
|
|
||||||
$principals[]= $principalUri;
|
$principals[]= $principalUri;
|
||||||
|
|
||||||
$fields = array_values($this->propertyMap);
|
$fields = array_values($this->propertyMap);
|
||||||
|
|
|
@ -174,9 +174,6 @@ class CardDavBackend implements BackendInterface, SyncSupport {
|
||||||
$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) {
|
|
||||||
return urldecode($principal);
|
|
||||||
}, $principals);
|
|
||||||
$principals[] = $principalUri;
|
$principals[] = $principalUri;
|
||||||
|
|
||||||
$query = $this->db->getQueryBuilder();
|
$query = $this->db->getQueryBuilder();
|
||||||
|
|
|
@ -219,7 +219,7 @@ class GroupPrincipalBackend implements BackendInterface {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$carry[] = self::PRINCIPAL_PREFIX . '/' . $gid;
|
$carry[] = self::PRINCIPAL_PREFIX . '/' . urlencode($gid);
|
||||||
return $carry;
|
return $carry;
|
||||||
}, []);
|
}, []);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue