diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2020-11-17 14:21:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 14:21:06 +0100 |
commit | 751aa3f6b710e67eb8117f4257da7623d34c7ae8 (patch) | |
tree | 59dcc835f9d032e9092795afa3a01fde63871f69 | |
parent | 8a710c88372511dcb68abab195771d2a9639061e (diff) | |
download | nextcloud-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.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) { |