MDL-45221 admin: configexecutable admin settings should only accept files

This commit is contained in:
Andrew Nicols
2014-04-28 12:21:21 +08:00
parent e865dff3bb
commit 9cd7bb3764
3 changed files with 31 additions and 1 deletions
+1 -1
View File
@@ -2466,7 +2466,7 @@ class admin_setting_configexecutable extends admin_setting_configfile {
$default = $this->get_defaultsetting();
if ($data) {
if (file_exists($data) and is_executable($data)) {
if (file_exists($data) and !is_dir($data) and is_executable($data)) {
$executable = '<span class="pathok">&#x2714;</span>';
} else {
$executable = '<span class="patherror">&#x2718;</span>';