Skip to content

Commit

Permalink
fix(PageTrashBackend): Ignore emty relativePath in getTrashNodeById()
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas <jonas@freesources.org>
  • Loading branch information
mejo- committed Sep 25, 2023
1 parent ea83450 commit 3700d61
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Trash/PageTrashBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 3700d61

Please sign in to comment.