From: Andrew Dolgov Date: Sat, 27 Sep 2014 05:49:52 +0000 (+0400) Subject: Merge pull request #410 from bram85/master X-Git-Tag: 1.14~6 X-Git-Url: https://git.wh0rd.org/?p=tt-rss.git;a=commitdiff_plain;h=41fac971c481b68c52c08b95148a17caba7a5fa7;hp=5a6842fcab28ed2a4a340f5a9f779b431df56541 Merge pull request #410 from bram85/master Updater: check whether system() is useable. --- diff --git a/plugins/updater/init.php b/plugins/updater/init.php index ef48858b..6ee018f7 100644 --- a/plugins/updater/init.php +++ b/plugins/updater/init.php @@ -63,6 +63,20 @@ class Updater extends Plugin { putenv("PATH=" . getenv("PATH") . PATH_SEPARATOR . "/bin" . PATH_SEPARATOR . "/usr/bin"); + array_push($log, "Checking for system() call..."); + + $disabled = explode(',', ini_get('disable_functions')); + foreach ($disabled as $function) { + if ( trim($function) == 'system' ) { + array_push($log, "Can not execute commands with PHP's system() function."); + $stop = true; + } + } + + if ( $stop == true ) { + break; + } + array_push($log, "Checking for tar..."); $system_rc = 0;