another case for bug 1759194
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
* Returns array of filtered file names
|
* Returns array of filtered file names
|
||||||
*
|
*
|
||||||
* @param string directory to list
|
* @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
|
* @returns array sorted file list on success, FALSE on failure
|
||||||
*/
|
*/
|
||||||
function PMA_getDirContent($dir, $expression = '')
|
function PMA_getDirContent($dir, $expression = '')
|
||||||
@@ -23,8 +23,8 @@ function PMA_getDirContent($dir, $expression = '')
|
|||||||
}
|
}
|
||||||
while ($file = @readdir($handle)) {
|
while ($file = @readdir($handle)) {
|
||||||
// for PHP < 5.2.4, is_file() gives a warning when using open_basedir
|
// for PHP < 5.2.4, is_file() gives a warning when using open_basedir
|
||||||
// and opening '..'
|
// and verifying '..' or '.'
|
||||||
if ('..' != $file && is_file($dir . $file) && ($expression == '' || preg_match($expression, $file))) {
|
if ('.' != $file && '..' != $file && is_file($dir . $file) && ($expression == '' || preg_match($expression, $file))) {
|
||||||
$result[] = $file;
|
$result[] = $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user