diff options
author | simonspa <1677436+simonspa@users.noreply.github.com> | 2020-01-07 23:24:06 +0100 |
---|---|---|
committer | Simon Spannagel <simon.spannagel@cern.ch> | 2020-01-07 23:47:07 +0100 |
commit | b3ad27f7dbec28c1a418f572906618ae10506972 (patch) | |
tree | 34cef7192c05f95ba428039fac18fc5d8771de2f /apps/files_trashbin | |
parent | 86bccde9c7341a8925a5039bd05f0b10c01c0b3d (diff) | |
download | nextcloud-server-b3ad27f7dbec28c1a418f572906618ae10506972.tar.gz nextcloud-server-b3ad27f7dbec28c1a418f572906618ae10506972.zip |
Trash bin: fix exception triggered if no correct fileId is provided.
This fixes #17115
Signed-off-by: Simon Spannagel <simon.spannagel@cern.ch>
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r-- | apps/files_trashbin/lib/Controller/PreviewController.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_trashbin/lib/Controller/PreviewController.php b/apps/files_trashbin/lib/Controller/PreviewController.php index 86789714057..a734454bd50 100644 --- a/apps/files_trashbin/lib/Controller/PreviewController.php +++ b/apps/files_trashbin/lib/Controller/PreviewController.php @@ -88,12 +88,12 @@ class PreviewController extends Controller { * @return DataResponse|Http\FileDisplayResponse */ public function getPreview( - int $fileId, + int $fileId = -1, int $x = 128, int $y = 128 ) { - if ($x === 0 || $y === 0) { + if ($fileId === -1 || $x === 0 || $y === 0) { return new DataResponse([], Http::STATUS_BAD_REQUEST); } |