circleId too short in some request
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
parent
ec4a226342
commit
abb05a5b1f
|
@ -1622,10 +1622,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);
|
||||
}
|
||||
try {
|
||||
$member = \OCA\Circles\Api\v1\Circles::getMember($sharedWith, $userId, 1);
|
||||
if ($member->getLevel() >= 4) {
|
||||
|
|
Loading…
Reference in New Issue