Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): Bump phpseclib/phpseclib from 2.0.47 to 2.0.48 #2014

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"pear/pear-core-minimal": "^1.10",
"php-http/guzzle7-adapter": "^1.0.0",
"php-opencloud/openstack": "^3.1",
"phpseclib/phpseclib": "^2.0.45",
"phpseclib/phpseclib": "^2.0.48",
"pimple/pimple": "^3.5.0",
"psr/clock": "^1.0",
"psr/container": "^2.0.2",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2888,17 +2888,17 @@
},
{
"name": "phpseclib/phpseclib",
"version": "2.0.47",
"version_normalized": "2.0.47.0",
"version": "2.0.48",
"version_normalized": "2.0.48.0",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
"reference": "b7d7d90ee7df7f33a664b4aea32d50a305d35adb"
"reference": "eaa7be704b8b93a6913b69eb7f645a59d7731b61"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/b7d7d90ee7df7f33a664b4aea32d50a305d35adb",
"reference": "b7d7d90ee7df7f33a664b4aea32d50a305d35adb",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/eaa7be704b8b93a6913b69eb7f645a59d7731b61",
"reference": "eaa7be704b8b93a6913b69eb7f645a59d7731b61",
"shasum": ""
},
"require": {
Expand All @@ -2916,7 +2916,7 @@
"ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations.",
"ext-xml": "Install the XML extension to load XML formatted public keys."
},
"time": "2024-02-26T04:55:38+00:00",
"time": "2024-12-14T21:03:54+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -2981,7 +2981,7 @@
],
"support": {
"issues": "https://github.com/phpseclib/phpseclib/issues",
"source": "https://github.com/phpseclib/phpseclib/tree/2.0.47"
"source": "https://github.com/phpseclib/phpseclib/tree/2.0.48"
},
"funding": [
{
Expand Down
6 changes: 3 additions & 3 deletions composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,9 @@
'dev_requirement' => false,
),
'phpseclib/phpseclib' => array(
'pretty_version' => '2.0.47',
'version' => '2.0.47.0',
'reference' => 'b7d7d90ee7df7f33a664b4aea32d50a305d35adb',
'pretty_version' => '2.0.48',
'version' => '2.0.48.0',
'reference' => 'eaa7be704b8b93a6913b69eb7f645a59d7731b61',
'type' => 'library',
'install_path' => __DIR__ . '/../phpseclib/phpseclib',
'aliases' => array(),
Expand Down
1 change: 0 additions & 1 deletion phpseclib/phpseclib/phpseclib/Crypt/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,6 @@ function getBlockLength()
*
* @access public
* @param string $key
* @internal Could, but not must, extend by the child Crypt_* class
*/
function setKey($key)
{
Expand Down
11 changes: 8 additions & 3 deletions phpseclib/phpseclib/phpseclib/Crypt/RSA.php
Original file line number Diff line number Diff line change
Expand Up @@ -1396,9 +1396,14 @@ function. As is, the definitive authority on this encoding scheme isn't the IET
$this->components = array();

$xml = xml_parser_create('UTF-8');
xml_set_object($xml, $this);
xml_set_element_handler($xml, '_start_element_handler', '_stop_element_handler');
xml_set_character_data_handler($xml, '_data_handler');
if (version_compare(PHP_VERSION, '8.4.0', '>=')) {
xml_set_element_handler($xml, array($this, '_start_element_handler'), array($this, '_stop_element_handler'));
xml_set_character_data_handler($xml, array($this, '_data_handler'));
} else {
xml_set_object($xml, $this);
xml_set_element_handler($xml, '_start_element_handler', '_stop_element_handler');
xml_set_character_data_handler($xml, '_data_handler');
}
// add <xml></xml> to account for "dangling" tags like <BitStrength>...</BitStrength> that are sometimes added
if (!xml_parse($xml, '<xml>' . $key . '</xml>')) {
xml_parser_free($xml);
Expand Down
7 changes: 4 additions & 3 deletions phpseclib/phpseclib/phpseclib/File/X509.php
Original file line number Diff line number Diff line change
Expand Up @@ -3847,7 +3847,8 @@ function signCSR($signatureAlgorithm = 'sha1WithRSAEncryption')
array(
'version' => 'v1',
'subject' => $this->dn,
'subjectPKInfo' => $publicKey
'subjectPKInfo' => $publicKey,
'attributes' => array()
),
'signatureAlgorithm' => array('algorithm' => $signatureAlgorithm),
'signature' => false // this is going to be overwritten later
Expand Down Expand Up @@ -4003,11 +4004,11 @@ function signCRL($issuer, $crl, $signatureAlgorithm = 'sha1WithRSAEncryption')
$version = isset($tbsCertList['version']) ? $tbsCertList['version'] : 0;
if (!$version) {
if (!empty($tbsCertList['crlExtensions'])) {
$version = 1; // v2.
$version = 'v2'; // v2.
} elseif (!empty($tbsCertList['revokedCertificates'])) {
foreach ($tbsCertList['revokedCertificates'] as $cert) {
if (!empty($cert['crlEntryExtensions'])) {
$version = 1; // v2.
$version = 'v2'; // v2.
}
}
}
Expand Down
11 changes: 10 additions & 1 deletion phpseclib/phpseclib/phpseclib/Math/BigInteger.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,17 @@ class BigInteger
function __construct($x = 0, $base = 10)
{
if (!defined('MATH_BIGINTEGER_MODE')) {

// https://github.com/php/php-src/commit/e0a0e216a909dc4ee4ea7c113a5f41d49525f02e broke GMP
// https://github.com/php/php-src/commit/424ba0f2ff9677d16b4e339e90885bd4bc49fcf1 fixed it
// see https://github.com/php/php-src/issues/16870 for more info
if (version_compare(PHP_VERSION, '8.2.26', '<')) {
$gmpOK = true;
} else {
$gmpOK = !in_array(PHP_VERSION_ID, array(80226, 80314, 80400, 80401));
}
switch (true) {
case extension_loaded('gmp'):
case extension_loaded('gmp') && $gmpOK:
define('MATH_BIGINTEGER_MODE', self::MODE_GMP);
break;
case extension_loaded('bcmath'):
Expand Down
21 changes: 16 additions & 5 deletions phpseclib/phpseclib/phpseclib/Net/SFTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,8 @@ function _init_sftp_connection()
return false;
}
$this->canonicalize_paths = false;
$this->_reset_connection(NET_SSH2_DISCONNECT_CONNECTION_LOST);
$this->_reset_sftp();
return $this->_init_sftp_connection();
}

$this->_update_stat_cache($this->pwd, array());
Expand Down Expand Up @@ -3629,20 +3630,30 @@ function _send_sftp_packet($type, $data, $request_id = 1)
}

/**
* Resets a connection for re-use
* Resets the SFTP channel for re-use
*
* @param int $reason
* @access private
*/
function _reset_connection($reason)
function _reset_sftp()
{
parent::_reset_connection($reason);
$this->use_request_id = false;
$this->pwd = false;
$this->requestBuffer = array();
$this->partial_init = false;
}

/**
* Resets a connection for re-use
*
* @param int $reason
* @access private
*/
function _reset_connection($reason)
{
parent::_reset_connection($reason);
$this->_reset_sftp();
}

/**
* Receives SFTP Packets
*
Expand Down
Loading