increase minimum PHP version to 7.2
This commit is contained in:
parent
24486f8c92
commit
3f874cb397
|
@ -5,7 +5,7 @@
|
|||
"type": "project",
|
||||
"license": "GPL v2",
|
||||
"require": {
|
||||
"php": ">=5.6",
|
||||
"php": ">=7.2",
|
||||
"ext-json": "*",
|
||||
"splitbrain/php-archive": "~1.0",
|
||||
"phpseclib/phpseclib": "~2.0",
|
||||
|
@ -19,10 +19,12 @@
|
|||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "5.6"
|
||||
"php": "7.2"
|
||||
}
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "The mbstring extension is highly reccomended to speed up all UTF-8 handling",
|
||||
"ext-intl": "The intl extension allows for better locale specific sorting",
|
||||
"squizlabs/php_codesniffer": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
|
||||
"phpunit/phpunit": "Allows automated tests to be run without system-wide install (only version 4-7 are supported)."
|
||||
},
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "1ebbfe99c51901f3e1fb0c95d1703e9f",
|
||||
"content-hash": "dc3e894425a4e285b1c56c2ce4966a60",
|
||||
"packages": [
|
||||
{
|
||||
"name": "aziraphale/email-address-validator",
|
||||
|
@ -241,16 +241,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpseclib/phpseclib",
|
||||
"version": "2.0.27",
|
||||
"version": "2.0.28",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpseclib/phpseclib.git",
|
||||
"reference": "34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc"
|
||||
"reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc",
|
||||
"reference": "34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d1ca58cf33cb21046d702ae3a7b14fdacd9f3260",
|
||||
"reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -343,7 +343,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-04-04T23:17:33+00:00"
|
||||
"time": "2020-07-08T09:08:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "simplepie/simplepie",
|
||||
|
@ -534,12 +534,12 @@
|
|||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": ">=5.6",
|
||||
"php": ">=7.2",
|
||||
"ext-json": "*"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"platform-overrides": {
|
||||
"php": "5.6"
|
||||
"php": "7.2"
|
||||
},
|
||||
"plugin-api-version": "1.1.0"
|
||||
}
|
||||
|
|
|
@ -123,13 +123,13 @@ function check(){
|
|||
if ($INFO['isadmin'] || $INFO['ismanager']){
|
||||
msg('DokuWiki version: '.getVersion(),1);
|
||||
|
||||
if(version_compare(phpversion(),'5.6.0','<')){
|
||||
msg('Your PHP version is too old ('.phpversion().' vs. 5.6.0+ needed)',-1);
|
||||
if(version_compare(phpversion(),'7.2.0','<')){
|
||||
msg('Your PHP version is too old ('.phpversion().' vs. 7.2+ needed)',-1);
|
||||
}else{
|
||||
msg('PHP version '.phpversion(),1);
|
||||
}
|
||||
} else {
|
||||
if(version_compare(phpversion(),'5.6.0','<')){
|
||||
if(version_compare(phpversion(),'7.2.0','<')){
|
||||
msg('Your PHP version is too old',-1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -244,17 +244,17 @@
|
|||
},
|
||||
{
|
||||
"name": "phpseclib/phpseclib",
|
||||
"version": "2.0.27",
|
||||
"version_normalized": "2.0.27.0",
|
||||
"version": "2.0.28",
|
||||
"version_normalized": "2.0.28.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpseclib/phpseclib.git",
|
||||
"reference": "34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc"
|
||||
"reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc",
|
||||
"reference": "34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d1ca58cf33cb21046d702ae3a7b14fdacd9f3260",
|
||||
"reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -272,7 +272,7 @@
|
|||
"ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
|
||||
"ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations."
|
||||
},
|
||||
"time": "2020-04-04T23:17:33+00:00",
|
||||
"time": "2020-07-08T09:08:33+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
|
|
@ -44,7 +44,7 @@ AES, Blowfish, Twofish, SSH-1, SSH-2, SFTP, and X.509
|
|||
* Composer compatible (PSR-0 autoloading)
|
||||
* Install using Composer: `composer require phpseclib/phpseclib:~1.0`
|
||||
* Install using PEAR: See [phpseclib PEAR Channel Documentation](http://phpseclib.sourceforge.net/pear.htm)
|
||||
* [Download 1.0.18 as ZIP](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.18.zip/download)
|
||||
* [Download 1.0.19 as ZIP](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.19.zip/download)
|
||||
|
||||
## Security contact information
|
||||
|
||||
|
|
|
@ -413,7 +413,7 @@ abstract class Base
|
|||
* @var mixed
|
||||
* @access private
|
||||
*/
|
||||
var $use_inline_crypt;
|
||||
var $use_inline_crypt = true;
|
||||
|
||||
/**
|
||||
* If OpenSSL can be used in ECB but not in CTR we can emulate CTR
|
||||
|
@ -495,11 +495,6 @@ abstract class Base
|
|||
}
|
||||
|
||||
$this->_setEngine();
|
||||
|
||||
// Determining whether inline crypting can be used by the cipher
|
||||
if ($this->use_inline_crypt !== false) {
|
||||
$this->use_inline_crypt = version_compare(PHP_VERSION, '5.3.0') >= 0 || function_exists('create_function');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2602,12 +2597,8 @@ abstract class Base
|
|||
}
|
||||
|
||||
// Create the $inline function and return its name as string. Ready to run!
|
||||
if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
|
||||
eval('$func = function ($_action, &$self, $_text) { ' . $init_crypt . 'if ($_action == "encrypt") { ' . $encrypt . ' } else { ' . $decrypt . ' } };');
|
||||
return $func;
|
||||
}
|
||||
|
||||
return create_function('$_action, &$self, $_text', $init_crypt . 'if ($_action == "encrypt") { ' . $encrypt . ' } else { ' . $decrypt . ' }');
|
||||
eval('$func = function ($_action, &$self, $_text) { ' . $init_crypt . 'if ($_action == "encrypt") { ' . $encrypt . ' } else { ' . $decrypt . ' } };');
|
||||
return $func;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -272,7 +272,7 @@ class ANSI
|
|||
case "\x1B[K": // Clear screen from cursor right
|
||||
$this->screen[$this->y] = substr($this->screen[$this->y], 0, $this->x);
|
||||
|
||||
array_splice($this->attrs[$this->y], $this->x + 1, $this->max_x - $this->x, array_fill($this->x, $this->max_x - $this->x - 1, $this->base_attr_cell));
|
||||
array_splice($this->attrs[$this->y], $this->x + 1, $this->max_x - $this->x, array_fill($this->x, $this->max_x - ($this->x - 1), $this->base_attr_cell));
|
||||
break;
|
||||
case "\x1B[2K": // Clear entire line
|
||||
$this->screen[$this->y] = str_repeat(' ', $this->x);
|
||||
|
|
|
@ -719,7 +719,7 @@ class SFTP extends SSH2
|
|||
}
|
||||
}
|
||||
|
||||
if ($path[0] != '/') {
|
||||
if (!strlen($path) || $path[0] != '/') {
|
||||
$path = $this->pwd . '/' . $path;
|
||||
}
|
||||
|
||||
|
@ -1198,6 +1198,9 @@ class SFTP extends SSH2
|
|||
$temp = &$this->stat_cache;
|
||||
$max = count($dirs) - 1;
|
||||
foreach ($dirs as $i => $dir) {
|
||||
if (!is_array($temp)) {
|
||||
return false;
|
||||
}
|
||||
if ($i === $max) {
|
||||
unset($temp[$dir]);
|
||||
return true;
|
||||
|
@ -1224,6 +1227,9 @@ class SFTP extends SSH2
|
|||
|
||||
$temp = &$this->stat_cache;
|
||||
foreach ($dirs as $dir) {
|
||||
if (!is_array($temp)) {
|
||||
return null;
|
||||
}
|
||||
if (!isset($temp[$dir])) {
|
||||
return null;
|
||||
}
|
||||
|
@ -2018,8 +2024,8 @@ class SFTP extends SSH2
|
|||
$sent = 0;
|
||||
$size = $size < 0 ? ($size & 0x7FFFFFFF) + 0x80000000 : $size;
|
||||
|
||||
$sftp_packet_size = 4096; // PuTTY uses 4096
|
||||
// make the SFTP packet be exactly 4096 bytes by including the bytes in the NET_SFTP_WRITE packets "header"
|
||||
$sftp_packet_size = $this->max_sftp_packet;
|
||||
// make the SFTP packet be exactly the SFTP packet size by including the bytes in the NET_SFTP_WRITE packets "header"
|
||||
$sftp_packet_size-= strlen($handle) + 25;
|
||||
$i = $j = 0;
|
||||
while ($dataCallback || ($size === 0 || $sent < $size)) {
|
||||
|
|
|
@ -3004,7 +3004,7 @@ class SSH2
|
|||
* @see self::write()
|
||||
* @param string $expect
|
||||
* @param int $mode
|
||||
* @return string
|
||||
* @return string|bool
|
||||
* @access public
|
||||
*/
|
||||
function read($expect = '', $mode = self::READ_SIMPLE)
|
||||
|
@ -3894,7 +3894,7 @@ class SSH2
|
|||
$this->channel_buffers[$channel][] = $data;
|
||||
break;
|
||||
case NET_SSH2_MSG_CHANNEL_CLOSE:
|
||||
$this->curTimeout = 0;
|
||||
$this->curTimeout = 5;
|
||||
|
||||
if ($this->bitmap & self::MASK_SHELL) {
|
||||
$this->bitmap&= ~self::MASK_SHELL;
|
||||
|
@ -4123,11 +4123,15 @@ class SSH2
|
|||
|
||||
$this->channel_status[$client_channel] = NET_SSH2_MSG_CHANNEL_CLOSE;
|
||||
|
||||
$this->curTimeout = 0;
|
||||
$this->curTimeout = 5;
|
||||
|
||||
while (!is_bool($this->_get_channel_packet($client_channel))) {
|
||||
}
|
||||
|
||||
if ($this->is_timeout) {
|
||||
$this->disconnect();
|
||||
}
|
||||
|
||||
if ($want_reply) {
|
||||
$this->_send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$client_channel]));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue