summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2020-11-17 14:21:06 +0100
committerGitHub <noreply@github.com>2020-11-17 14:21:06 +0100
commit751aa3f6b710e67eb8117f4257da7623d34c7ae8 (patch)
tree59dcc835f9d032e9092795afa3a01fde63871f69
parent8a710c88372511dcb68abab195771d2a9639061e (diff)
downloadnextcloud-server-751aa3f6b710e67eb8117f4257da7623d34c7ae8.tar.gz
nextcloud-server-751aa3f6b710e67eb8117f4257da7623d34c7ae8.zip
Revert "[stable19] circleId too short in some request"
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php7
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) {