diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-01-07 11:10:45 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-01-07 11:10:45 -0800 |
commit | b6474506ebde78ef563d0d0c431d8ad02e7f125c (patch) | |
tree | f7f350bd71730a3ff24a00af79226e930051861a /lib/private | |
parent | 2d5427efa99e910abe46f2c6ab567b2392169f26 (diff) | |
parent | 09d7882571e047de4ed907f0f0317dae056cf890 (diff) | |
download | nextcloud-server-b6474506ebde78ef563d0d0c431d8ad02e7f125c.tar.gz nextcloud-server-b6474506ebde78ef563d0d0c431d8ad02e7f125c.zip |
Merge pull request #6660 from owncloud/fixing-disabled-function-checks
Fixing disabled function checks
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/helper.php | 6 | ||||
-rw-r--r-- | lib/private/preview/movies.php | 2 | ||||
-rw-r--r-- | lib/private/preview/office.php | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/lib/private/helper.php b/lib/private/helper.php index 4fe3097af26..1c8d01c141f 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -858,11 +858,13 @@ class OC_Helper { if (!function_exists($function_name)) { return false; } - $disabled = explode(', ', ini_get('disable_functions')); + $disabled = explode(',', ini_get('disable_functions')); + $disabled = array_map('trim', $disabled); if (in_array($function_name, $disabled)) { return false; } - $disabled = explode(', ', ini_get('suhosin.executor.func.blacklist')); + $disabled = explode(',', ini_get('suhosin.executor.func.blacklist')); + $disabled = array_map('trim', $disabled); if (in_array($function_name, $disabled)) { return false; } diff --git a/lib/private/preview/movies.php b/lib/private/preview/movies.php index ac771deb413..71cd3bae057 100644 --- a/lib/private/preview/movies.php +++ b/lib/private/preview/movies.php @@ -18,7 +18,7 @@ function findBinaryPath($program) { // movie preview is currently not supported on Windows if (!\OC_Util::runningOnWindows()) { - $isExecEnabled = !in_array('exec', explode(', ', ini_get('disable_functions'))); + $isExecEnabled = \OC_Helper::is_function_enabled('exec'); $ffmpegBinary = null; $avconvBinary = null; diff --git a/lib/private/preview/office.php b/lib/private/preview/office.php index 318ab51f851..7a4826c76ec 100644 --- a/lib/private/preview/office.php +++ b/lib/private/preview/office.php @@ -7,7 +7,7 @@ */ //both, libreoffice backend and php fallback, need imagick if (extension_loaded('imagick')) { - $isShellExecEnabled = !in_array('shell_exec', explode(', ', ini_get('disable_functions'))); + $isShellExecEnabled = \OC_Helper::is_function_enabled('shell_exec'); // LibreOffice preview is currently not supported on Windows if (!\OC_Util::runningOnWindows()) { |