From d54be8e1226b8982de081ad0ea0a446fe0b2db4c Mon Sep 17 00:00:00 2001 From: Chris Kankiewicz Date: Sun, 31 May 2020 14:12:58 -0700 Subject: [PATCH] Return 404 if attempting to zip a file --- app/src/Controllers/ZipController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/Controllers/ZipController.php b/app/src/Controllers/ZipController.php index a69e5d4..7c358fa 100644 --- a/app/src/Controllers/ZipController.php +++ b/app/src/Controllers/ZipController.php @@ -60,7 +60,7 @@ class ZipController { $path = $request->getQueryParams()['zip']; - if (! $this->container->get('zip_downloads') || ! realpath($path)) { + if (! $this->container->get('zip_downloads') || ! is_dir($path)) { return $response->withStatus(404, $this->translator->trans('error.file_not_found')); }