From de66d184df838c3a5e254ae585a5a9b82b8e7bff Mon Sep 17 00:00:00 2001 From: provokateurin Date: Tue, 27 Jan 2026 08:07:20 +0100 Subject: [PATCH] fix(DAV): Fix getFileFromAbsoluteUri Signed-off-by: provokateurin --- lib/Service/FileService.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/Service/FileService.php b/lib/Service/FileService.php index 99f0f274..09074524 100644 --- a/lib/Service/FileService.php +++ b/lib/Service/FileService.php @@ -130,7 +130,14 @@ public function getFileFromUri(string $uri): Node { * @throws NoUserException */ public function getFileFromAbsoluteUri(string $uri): Node { - list($root, $userId, $path) = explode('/', trim($uri, '/') . '/', 3); + $user = $this->userSession->getUser(); + if ($user === null) { + throw new SessionNotAvailableException(); + } + + $userId = $user->getUID(); + + list($root, , $path) = explode('/', trim($uri, '/') . '/', 3); if ($root !== 'files') { throw new NotFoundException(); }