Skip to content

Commit

Permalink
#370 - Fix reading file in file.php.
Browse files Browse the repository at this point in the history
  • Loading branch information
maraf committed Oct 5, 2021
1 parent 83f03bd commit e7050bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

if (count($file) == 1) {
$filePath = $flObject->getPhysicalPathTo($file[0]['dir_id']) . $file[0][FileAdmin::$FileSystemItemPath] . "." . FileAdmin::$FileExtensions[$file[0]['type']];
if (!file_exists($filePath) || is_readable($filePath)) {
if (!file_exists($filePath)) {
header("HTTP/1.1 404 Not Found");
echo '<h1 class="error">Error 404</h1><p class="error">Requested file doesn\'t exists.</p>';
exit;
Expand Down

0 comments on commit e7050bf

Please sign in to comment.