[Pkg-owncloud-commits] [owncloud] 36/61: only call exec() if allowed to
David Prévot
taffit at moszumanska.debian.org
Thu Jul 31 03:51:46 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit eb665bf3c8cad7672ec5608d1e86f86a633df595
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Tue Jul 29 16:59:40 2014 +0200
only call exec() if allowed to
---
settings/admin.php | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/settings/admin.php b/settings/admin.php
index 704f451..dd5f969 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;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list