From 8dcc7feaa11417c5d817bf5f1c353048d2bf0dbe Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 4 Apr 2022 19:12:41 +0200 Subject: [PATCH] fix deprecated and disabled function defaults --- Module/PackageManager.php | 12 ++---------- Security/PhpCode.php | 12 ++++++------ 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/Module/PackageManager.php b/Module/PackageManager.php index 39e9a0007..c22bb40c4 100644 --- a/Module/PackageManager.php +++ b/Module/PackageManager.php @@ -20,6 +20,7 @@ use phpOMS\System\File\Local\LocalStorage; use phpOMS\System\File\PathException; use phpOMS\System\OperatingSystem; use phpOMS\System\SystemType; +use phpOMS\System\SystemUtils; use phpOMS\Utils\IO\Zip\Zip; use phpOMS\Utils\StringUtils; @@ -307,16 +308,7 @@ final class PackageManager } if ($cmd !== '') { - $pipes = []; - $resource = \proc_open($cmd, [1 => ['pipe', 'w'], 2 => ['pipe', 'w']], $pipes, $this->extractPath); - - foreach ($pipes as $pipe) { - \fclose($pipe); - } - - if ($resource !== false) { - \proc_close($resource); - } + // @todo implement } } } diff --git a/Security/PhpCode.php b/Security/PhpCode.php index 475043e1f..06efa5ef5 100644 --- a/Security/PhpCode.php +++ b/Security/PhpCode.php @@ -34,12 +34,12 @@ final class PhpCode * @since 1.0.0 */ public static array $disabledFunctions = [ - 'apache_child_terminate', 'apache_setenv', 'define_syslog_variables', 'escapeshellarg', 'escapeshellcmd', 'eval', + 'apache_child_terminate', 'apache_setenv', 'define_syslog_variables', 'eval', 'exec', 'fp', 'fput', 'ftp_connect', 'ftp_exec', 'ftp_get', 'ftp_login', 'ftp_nb_fput', 'ftp_put', 'ftp_raw', 'ftp_rawlist', 'highlight_file', 'ini_alter', 'ini_get_all', 'ini_restore', 'inject_code', 'mysql_pconnect', - 'openlog', 'passthru', 'php_uname', 'phpAds_remoteInfo', 'phpAds_XmlRpc', 'phpAds_xmlrpcDecode', + 'openlog', 'php_uname', 'phpAds_remoteInfo', 'phpAds_XmlRpc', 'phpAds_xmlrpcDecode', 'phpAds_xmlrpcEncode', 'popen', 'posix_getpwuid', 'posix_kill', 'posix_mkfifo', 'posix_setpgid', 'posix_setsid', - 'posix_setuid', 'posix_uname', 'proc_close', 'proc_get_status', + 'posix_setuid', 'posix_uname', 'proc_close', 'proc_get_status', 'shell_exec', ]; /** @@ -49,12 +49,12 @@ final class PhpCode * @since 1.0.0 */ public static array $deprecatedFunctions = [ - 'apache_child_terminate', 'apache_setenv', 'define_syslog_variables', 'escapeshellarg', 'escapeshellcmd', 'eval', + 'apache_child_terminate', 'apache_setenv', 'define_syslog_variables', 'eval', 'exec', 'fp', 'fput', 'ftp_connect', 'ftp_exec', 'ftp_get', 'ftp_login', 'ftp_nb_fput', 'ftp_put', 'ftp_raw', 'ftp_rawlist', 'highlight_file', 'ini_alter', 'ini_get_all', 'ini_restore', 'inject_code', 'mysql_pconnect', - 'openlog', 'passthru', 'php_uname', 'phpAds_remoteInfo', 'phpAds_XmlRpc', 'phpAds_xmlrpcDecode', + 'openlog', 'php_uname', 'phpAds_remoteInfo', 'phpAds_XmlRpc', 'phpAds_xmlrpcDecode', 'phpAds_xmlrpcEncode', 'popen', 'posix_getpwuid', 'posix_kill', 'posix_mkfifo', 'posix_setpgid', 'posix_setsid', - 'posix_setuid', 'posix_uname', 'proc_close', 'proc_get_status', + 'posix_setuid', 'posix_uname', 'proc_close', 'proc_get_status', 'shell_exec', ]; /**