summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/DAV/GroupPrincipalBackend.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-02-28 00:34:09 -0600
committerGitHub <noreply@github.com>2017-02-28 00:34:08 -0600
commitb72b02778dac5b1ab15594de8dce0ccd04a030ba (patch)
tree0a4c8d8341c33f5968ad4b4ccbc912c143de4291 /apps/dav/lib/DAV/GroupPrincipalBackend.php
parent413d671d9e9d8928c062dac4b993db12a618c590 (diff)
parentc75b5a56140605308237d94038947b1b27941521 (diff)
downloadnextcloud-server-b72b02778dac5b1ab15594de8dce0ccd04a030ba.tar.gz
nextcloud-server-b72b02778dac5b1ab15594de8dce0ccd04a030ba.zip
Merge pull request #2997 from nextcloud/fix_2957
Allow groups with / in sabre
Diffstat (limited to 'apps/dav/lib/DAV/GroupPrincipalBackend.php')
-rw-r--r--apps/dav/lib/DAV/GroupPrincipalBackend.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/dav/lib/DAV/GroupPrincipalBackend.php b/apps/dav/lib/DAV/GroupPrincipalBackend.php
index f8dc1e60881..f6295d3b386 100644
--- a/apps/dav/lib/DAV/GroupPrincipalBackend.php
+++ b/apps/dav/lib/DAV/GroupPrincipalBackend.php
@@ -76,14 +76,14 @@ class GroupPrincipalBackend implements BackendInterface {
* @return array
*/
public function getPrincipalByPath($path) {
- $elements = explode('/', $path);
+ $elements = explode('/', $path, 3);
if ($elements[0] !== 'principals') {
return null;
}
if ($elements[1] !== 'groups') {
return null;
}
- $name = $elements[2];
+ $name = urldecode($elements[2]);
$group = $this->groupManager->get($name);
if (!is_null($group)) {
@@ -179,7 +179,7 @@ class GroupPrincipalBackend implements BackendInterface {
protected function groupToPrincipal($group) {
$groupId = $group->getGID();
$principal = [
- 'uri' => "principals/groups/$groupId",
+ 'uri' => 'principals/groups/' . urlencode($groupId),
'{DAV:}displayname' => $groupId,
];