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

This commit is contained in:
Andrew Nicols
2014-04-28 12:21:42 +08:00
parent 4f214c3b64
commit 29fe6d8155
3 changed files with 31 additions and 1 deletions
+1 -1
View File
@@ -2352,7 +2352,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>';