Skip to content

Commit

Permalink
Print error from CLI scripts when system/exec function is disabled (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed May 5, 2017
1 parent 0b595fa commit 5b741ab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------------
Expand Down
5 changes: 4 additions & 1 deletion bin/install-jsdeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand Down Expand Up @@ -319,4 +323,3 @@ foreach ($SOURCES['dependencies'] as $package) {

echo "Done.\n\n";
}

4 changes: 4 additions & 0 deletions bin/installto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 5b741ab

Please sign in to comment.