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:
authorMaxence Lange <maxence@artificial-owl.com>2020-11-13 12:58:54 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-11-17 13:28:24 +0300
commit6db68e9ba304875c2bac54cc3aab1b386bf58bab (patch)
treeb0c7e7394abecb6876e3d3a55c5e3f41ed151b5f /apps/files_sharing/lib/Controller
parent51d8134e50b134545950117a6a89f8e4d2529be5 (diff)
circleId too short in some request
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'apps/files_sharing/lib/Controller')
-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) {