diff options
author | Julius Härtl <jus@bitgrid.net> | 2024-06-21 11:37:47 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2024-07-29 08:16:30 +0200 |
commit | 23ec547af02931caa0cfd7d42bfd4ba34fba1a54 (patch) | |
tree | 15f54061b3d6fa9da057b6ed6cd8ff7b841a0b80 /core | |
parent | d0aaf5c37134a5d5da720ae8760704a700ef8d46 (diff) | |
download | nextcloud-server-23ec547af02931caa0cfd7d42bfd4ba34fba1a54.tar.gz nextcloud-server-23ec547af02931caa0cfd7d42bfd4ba34fba1a54.zip |
fix: Ignore preview requests for invalid file ids
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'core')
-rw-r--r-- | core/Controller/PreviewController.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/Controller/PreviewController.php b/core/Controller/PreviewController.php index 7ab22dceaa2..4fa4b81ae59 100644 --- a/core/Controller/PreviewController.php +++ b/core/Controller/PreviewController.php @@ -160,6 +160,10 @@ class PreviewController extends Controller { return new DataResponse([], Http::STATUS_FORBIDDEN); } + if ($node->getId() <= 0) { + return new DataResponse([], Http::STATUS_NOT_FOUND); + } + $storage = $node->getStorage(); if ($storage->instanceOfStorage(SharedStorage::class)) { /** @var SharedStorage $storage */ |