1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-24 11:56:36 +02:00

Updater: check whether system() is useable.

system() was disabled on my system for security reasons, but the
updater would just continue, only to find out that the tarball
hasn't been extracted.
This commit is contained in:
Bram Schoenmakers 2014-09-17 19:05:52 +02:00
parent f8eb8d78ac
commit 96aba17f01

View File

@ -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;