diff options
Diffstat (limited to 'bin/files.php')
-rwxr-xr-x | bin/files.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/files.php b/bin/files.php index e7ffaa9..123644e 100755 --- a/bin/files.php +++ b/bin/files.php @@ -161,6 +161,14 @@ function filesgetlisting($dir) $filelisting = array(); $folderlisting = array(); + // Check dir + if (!isurlvalid($dir, "media") && !isurlvalid($dir, "rec")) + return array(); + + // Dont allow .. + if (preg_match("$\.\.$", $dir)) + return array(); + $dir_handle = @opendir($dir); if (!$dir_handle) return array(); |