diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-07-29 21:28:52 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-07-29 21:28:52 +0200 |
commit | a779878657f39d338cf2f822925776b2f4d28338 (patch) | |
tree | 05e904c81a0fa1028c066076ecca43d30bee05c3 | |
parent | 9bcf2c351cafec76628ec7a13375ffb593be07a3 (diff) | |
parent | 673a8bb2b862867c7e6b8a2e1f10253a4d8f9c5f (diff) | |
download | nextcloud-server-a779878657f39d338cf2f822925776b2f4d28338.tar.gz nextcloud-server-a779878657f39d338cf2f822925776b2f4d28338.zip |
Merge pull request #10022 from owncloud/fix-exec-admin-master
only call exec() if allowed to
-rwxr-xr-x | settings/admin.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/settings/admin.php b/settings/admin.php index 704f4519ff6..dd5f969fa1a 100755 --- a/settings/admin.php +++ b/settings/admin.php @@ -101,9 +101,11 @@ $tmpl->printPage(); * @return null|string */ function findBinaryPath($program) { - exec('command -v ' . escapeshellarg($program) . ' 2> /dev/null', $output, $returnCode); - if ($returnCode === 0 && count($output) > 0) { - return escapeshellcmd($output[0]); + if (OC_Helper::is_function_enabled('exec')) { + exec('command -v ' . escapeshellarg($program) . ' 2> /dev/null', $output, $returnCode); + if ($returnCode === 0 && count($output) > 0) { + return escapeshellcmd($output[0]); + } } return null; } |