mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-22 21:54:15 +02:00
Return 404 if attempting to zip a file
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user