Merge pull request #6660 from owncloud/fixing-disabled-function-checks
Fixing disabled function checks
This commit is contained in:
commit
b6474506eb
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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()) {
|
||||
|
|
Loading…
Reference in New Issue