summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-11-17 11:22:02 +0100
committerGitHub <noreply@github.com>2020-11-17 11:22:02 +0100
commit2429e8b4c586c7ec8f7bbe7edefbbd5f160f8c6f (patch)
tree4591b2ad9e6876a2f5096d9d8d96ad2af80e3f69 /apps
parentb24b74f03b83df186ea66095475f0e836702c07b (diff)
parent28252594a2a33517df47aa177e8a260c70da8523 (diff)
downloadnextcloud-server-2429e8b4c586c7ec8f7bbe7edefbbd5f160f8c6f.tar.gz
nextcloud-server-2429e8b4c586c7ec8f7bbe7edefbbd5f160f8c6f.zip
Merge pull request #24098 from nextcloud/bugfix/noid/resharing-rights-on-circles
circleId too short in some request
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index 2c2ec393d3f..aaca16b32e6 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -1648,10 +1648,11 @@ class ShareAPIController extends OCSController {
$hasCircleId = (substr($share->getSharedWith(), -1) === ']');
$shareWithStart = ($hasCircleId ? strrpos($share->getSharedWith(), '[') + 1 : 0);
$shareWithLength = ($hasCircleId ? -1 : strpos($share->getSharedWith(), ' '));
- if (is_bool($shareWithLength)) {
- $shareWithLength = -1;
+ if ($shareWithLength === false) {
+ $sharedWith = substr($share->getSharedWith(), $shareWithStart);
+ } else {
+ $sharedWith = substr($share->getSharedWith(), $shareWithStart, $shareWithLength);
}
- $sharedWith = substr($share->getSharedWith(), $shareWithStart, $shareWithLength);
try {
$member = \OCA\Circles\Api\v1\Circles::getMember($sharedWith, $userId, 1);
if ($member->getLevel() >= 4) {