Revert "[stable19] circleId too short in some request"
This commit is contained in:
parent
8a710c8837
commit
751aa3f6b7
|
@ -1622,11 +1622,10 @@ class ShareAPIController extends OCSController {
|
||||||
$hasCircleId = (substr($share->getSharedWith(), -1) === ']');
|
$hasCircleId = (substr($share->getSharedWith(), -1) === ']');
|
||||||
$shareWithStart = ($hasCircleId ? strrpos($share->getSharedWith(), '[') + 1 : 0);
|
$shareWithStart = ($hasCircleId ? strrpos($share->getSharedWith(), '[') + 1 : 0);
|
||||||
$shareWithLength = ($hasCircleId ? -1 : strpos($share->getSharedWith(), ' '));
|
$shareWithLength = ($hasCircleId ? -1 : strpos($share->getSharedWith(), ' '));
|
||||||
if ($shareWithLength === false) {
|
if (is_bool($shareWithLength)) {
|
||||||
$sharedWith = substr($share->getSharedWith(), $shareWithStart);
|
$shareWithLength = -1;
|
||||||
} else {
|
|
||||||
$sharedWith = substr($share->getSharedWith(), $shareWithStart, $shareWithLength);
|
|
||||||
}
|
}
|
||||||
|
$sharedWith = substr($share->getSharedWith(), $shareWithStart, $shareWithLength);
|
||||||
try {
|
try {
|
||||||
$member = \OCA\Circles\Api\v1\Circles::getMember($sharedWith, $userId, 1);
|
$member = \OCA\Circles\Api\v1\Circles::getMember($sharedWith, $userId, 1);
|
||||||
if ($member->getLevel() >= 4) {
|
if ($member->getLevel() >= 4) {
|
||||||
|
|
Loading…
Reference in New Issue