diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-11-17 21:53:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 21:53:27 +0100 |
commit | 29f8e6df44cc932b60d3c624543b1a7748cf8e23 (patch) | |
tree | 59dcc835f9d032e9092795afa3a01fde63871f69 | |
parent | 8a710c88372511dcb68abab195771d2a9639061e (diff) | |
parent | 751aa3f6b710e67eb8117f4257da7623d34c7ae8 (diff) | |
download | nextcloud-server-29f8e6df44cc932b60d3c624543b1a7748cf8e23.tar.gz nextcloud-server-29f8e6df44cc932b60d3c624543b1a7748cf8e23.zip |
Merge pull request #24184 from nextcloud/revert-24177-backport/24098/stable19
Revert "[stable19] circleId too short in some request"
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index cdbacafb751..579391efc5c 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -1622,11 +1622,10 @@ class ShareAPIController extends OCSController { $hasCircleId = (substr($share->getSharedWith(), -1) === ']'); $shareWithStart = ($hasCircleId ? strrpos($share->getSharedWith(), '[') + 1 : 0); $shareWithLength = ($hasCircleId ? -1 : strpos($share->getSharedWith(), ' ')); - if ($shareWithLength === false) { - $sharedWith = substr($share->getSharedWith(), $shareWithStart); - } else { - $sharedWith = substr($share->getSharedWith(), $shareWithStart, $shareWithLength); + if (is_bool($shareWithLength)) { + $shareWithLength = -1; } + $sharedWith = substr($share->getSharedWith(), $shareWithStart, $shareWithLength); try { $member = \OCA\Circles\Api\v1\Circles::getMember($sharedWith, $userId, 1); if ($member->getLevel() >= 4) { |