Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2020-11-17 16:20:02 +0300
committerGitHub <noreply@github.com>2020-11-17 16:20:02 +0300
commit1941f1b1a8b0f0ba9350875f21b090eb2c315d63 (patch)
treeaf000c61e13d940c49e7b9d83d046f8f2bcf612d /apps/files_sharing/lib
parentf06f9a91b3f29891fd7aae0b5a3b19f1f9b7690f (diff)
Revert "[stable20] circleId too short in some request"
Diffstat (limited to 'apps/files_sharing/lib')
-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 aaca16b32e6..2c2ec393d3f 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -1648,11 +1648,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) {