From cbbb4acf85c2209d75d715c8f222b4cceb0293e2 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 21 Nov 2007 13:58:40 +0000 Subject: [PATCH] another case for bug 1759194 --- libraries/file_listing.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/file_listing.php b/libraries/file_listing.php index 46028f5ae..017aed6b8 100644 --- a/libraries/file_listing.php +++ b/libraries/file_listing.php @@ -11,7 +11,7 @@ * Returns array of filtered file names * * @param string directory to list - * @param string regullar expression to match files + * @param string regular expression to match files * @returns array sorted file list on success, FALSE on failure */ function PMA_getDirContent($dir, $expression = '') @@ -23,8 +23,8 @@ function PMA_getDirContent($dir, $expression = '') } while ($file = @readdir($handle)) { // for PHP < 5.2.4, is_file() gives a warning when using open_basedir - // and opening '..' - if ('..' != $file && is_file($dir . $file) && ($expression == '' || preg_match($expression, $file))) { + // and verifying '..' or '.' + if ('.' != $file && '..' != $file && is_file($dir . $file) && ($expression == '' || preg_match($expression, $file))) { $result[] = $file; } }