projects
/
bizou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Added proper 404 errors on file or directory not found
[bizou.git]
/
index.php
diff --git
a/index.php
b/index.php
index
a05287d
..
03989d6
100644
(file)
--- a/
index.php
+++ b/
index.php
@@
-103,6
+103,11
@@
$otherFiles = array();
$realDir = IMAGES_DIR.$shortPath;
+if (! is_dir($realDir)) {
+ header("HTTP/1.1 404 Not Found");
+ die("Directory Not Found");
+}
+
foreach (scandir($realDir) as $file) if ($file != '.' and $file != '..')
{
if (is_dir("$realDir/$file"))