From 3700d61dc70012fc438ab4c02560a9843a214430 Mon Sep 17 00:00:00 2001 From: Jonas Date: Mon, 25 Sep 2023 16:31:25 +0200 Subject: [PATCH] fix(PageTrashBackend): Ignore emty relativePath in `getTrashNodeById()` Signed-off-by: Jonas --- lib/Trash/PageTrashBackend.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Trash/PageTrashBackend.php b/lib/Trash/PageTrashBackend.php index 860ec94c6..859d333e7 100644 --- a/lib/Trash/PageTrashBackend.php +++ b/lib/Trash/PageTrashBackend.php @@ -509,6 +509,9 @@ public function getTrashNodeById(IUser $user, int $fileId): ?Node { } $absolutePath = $this->getAppFolder()->getMountPoint()->getMountPoint() . $path; $relativePath = $trashFolder->getRelativePath($absolutePath); + if (!$relativePath) { + return null; + } [, $collectiveId, $nameAndTime] = explode('/', $relativePath); if ($this->userHasAccessToFolder($user, (int)$collectiveId)) {