fix(files_sharing): filter out invalid shareWith in sharee API

Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
This commit is contained in:
skjnldsv 2024-07-31 17:29:46 +02:00 committed by John Molakvoæ
parent 9ef2e142c4
commit 712965daa1

View file

@ -257,7 +257,7 @@ class ShareesAPIController extends OCSController {
$sharees = $this->getAllShareesByType($user, $shareType);
$shareTypeResults = [];
foreach ($sharees as [$sharee, $displayname]) {
if (!isset($this->searchResultTypeMap[$shareType])) {
if (!isset($this->searchResultTypeMap[$shareType]) || trim($sharee) === '') {
continue;
}