Browse Source
Merge pull request #24098 from nextcloud/bugfix/noid/resharing-rights-on-circles
circleId too short in some request
pull/21716/head
Roeland Jago Douma
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
3 deletions
-
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) { |
|
|
|
|