diff --git a/CHANGELOG b/CHANGELOG index c8fbd30a1..222cfbb4f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ CHANGELOG Roundcube Webmail - Update to TinyMCE 4.5.7 - Fix bug where invalid recipients could be silently discarded (#5739) - Fix conflict with _gid cookie of Google Analytics (#5748) +- Print error from CLI scripts when system/exec function is disabled (#5744) RELEASE 1.3-rc -------------- diff --git a/bin/install-jsdeps.sh b/bin/install-jsdeps.sh index 7a27aeecd..9a33c06a6 100755 --- a/bin/install-jsdeps.sh +++ b/bin/install-jsdeps.sh @@ -23,6 +23,10 @@ define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' ); require_once INSTALL_PATH . 'program/include/clisetup.php'; +if (!function_exists('exec')) { + die("PHP exec() function is required. Check disable_functions in php.ini\n"); +} + $SOURCES = json_decode(file_get_contents(INSTALL_PATH . 'jsdeps.json'), true); if (empty($SOURCES['dependencies'])) { @@ -319,4 +323,3 @@ foreach ($SOURCES['dependencies'] as $package) { echo "Done.\n\n"; } - diff --git a/bin/installto.sh b/bin/installto.sh index 3eb09a392..667d3ae1a 100755 --- a/bin/installto.sh +++ b/bin/installto.sh @@ -23,6 +23,10 @@ define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' ); require_once INSTALL_PATH . 'program/include/clisetup.php'; +if (!function_exists('system')) { + rcube::raise_error("PHP system() function is required. Check disable_functions in php.ini.", false, true); +} + $target_dir = unslashify($_SERVER['argv'][1]); if (empty($target_dir) || !is_dir(realpath($target_dir)))