Skip to content

Commit

Permalink
Merge branch 'master' of github.com:LimeSurvey/LimeSurvey
Browse files Browse the repository at this point in the history
* 'master' of github.com:LimeSurvey/LimeSurvey:
  Dev: Don't check file '..' when listing template files
  • Loading branch information
Shnoulle committed Feb 23, 2018
2 parents c8bd77b + 320ecb8 commit f101a91
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions application/models/Template.php
Expand Up @@ -341,6 +341,10 @@ static public function getOtherFiles($filesDir)
$otherFiles = array();
if (file_exists($filesDir) && $handle = opendir($filesDir)) {
while (false !== ($file = readdir($handle))) {
// The file '..' can mess with open_basedir permissions.
if ($file == '..' || $file == '.') {
continue;
}
if (!is_dir($file)) {
$otherFiles[] = array("name" => $file);
}
Expand Down

0 comments on commit f101a91

Please sign in to comment.