Skip to content

Commit 5d09a7f

Browse files
Merge pull request #2379 from nextcloud/dependabot/composer/phpseclib/phpseclib-2.0.53
build(deps): bump phpseclib/phpseclib from 2.0.52 to 2.0.53
2 parents b8fd89b + ba29a09 commit 5d09a7f

6 files changed

Lines changed: 50 additions & 21 deletions

File tree

.github/workflows/composer-auto.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Compile Command
1+
name: Composer-update comment
22

33
on:
44
issue_comment:
@@ -9,7 +9,7 @@ permissions:
99

1010
jobs:
1111
init:
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-latest-low
1313

1414
# On pull requests and if the comment starts with `/composer-update`
1515
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/composer-update')

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"pear/pear-core-minimal": "^1.10",
4545
"php-http/guzzle7-adapter": "^1.1.0",
4646
"php-opencloud/openstack": "^3.14",
47-
"phpseclib/phpseclib": "^2.0.52",
47+
"phpseclib/phpseclib": "^2.0.53",
4848
"pimple/pimple": "^3.6.0",
4949
"psr/clock": "^1.0",
5050
"psr/container": "^2.0.2",

composer.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer/installed.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2912,17 +2912,17 @@
29122912
},
29132913
{
29142914
"name": "phpseclib/phpseclib",
2915-
"version": "2.0.52",
2916-
"version_normalized": "2.0.52.0",
2915+
"version": "2.0.53",
2916+
"version_normalized": "2.0.53.0",
29172917
"source": {
29182918
"type": "git",
29192919
"url": "https://github.com/phpseclib/phpseclib.git",
2920-
"reference": "2552c4001631d1cc844332faea6a08a49c964b28"
2920+
"reference": "2d1a664b940b9b8f367185307dc010d11a2790f3"
29212921
},
29222922
"dist": {
29232923
"type": "zip",
2924-
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/2552c4001631d1cc844332faea6a08a49c964b28",
2925-
"reference": "2552c4001631d1cc844332faea6a08a49c964b28",
2924+
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/2d1a664b940b9b8f367185307dc010d11a2790f3",
2925+
"reference": "2d1a664b940b9b8f367185307dc010d11a2790f3",
29262926
"shasum": ""
29272927
},
29282928
"require": {
@@ -2940,7 +2940,7 @@
29402940
"ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations.",
29412941
"ext-xml": "Install the XML extension to load XML formatted public keys."
29422942
},
2943-
"time": "2026-03-19T02:54:44+00:00",
2943+
"time": "2026-04-10T01:30:02+00:00",
29442944
"type": "library",
29452945
"installation-source": "dist",
29462946
"autoload": {
@@ -3005,7 +3005,7 @@
30053005
],
30063006
"support": {
30073007
"issues": "https://github.com/phpseclib/phpseclib/issues",
3008-
"source": "https://github.com/phpseclib/phpseclib/tree/2.0.52"
3008+
"source": "https://github.com/phpseclib/phpseclib/tree/2.0.53"
30093009
},
30103010
"funding": [
30113011
{

composer/installed.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,9 +410,9 @@
410410
'dev_requirement' => false,
411411
),
412412
'phpseclib/phpseclib' => array(
413-
'pretty_version' => '2.0.52',
414-
'version' => '2.0.52.0',
415-
'reference' => '2552c4001631d1cc844332faea6a08a49c964b28',
413+
'pretty_version' => '2.0.53',
414+
'version' => '2.0.53.0',
415+
'reference' => '2d1a664b940b9b8f367185307dc010d11a2790f3',
416416
'type' => 'library',
417417
'install_path' => __DIR__ . '/../phpseclib/phpseclib',
418418
'aliases' => array(),

phpseclib/phpseclib/phpseclib/Net/SSH2.php

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3793,7 +3793,7 @@ function _get_binary_packet($skip_channel_filter = false)
37933793
$this->bitmap = 0;
37943794
user_error('Error reading socket');
37953795
return false;
3796-
} elseif ($hmac != $this->hmac_check->hash(pack('NNCa*', $this->get_seq_no, $packet_length, $padding_length, $payload . $padding))) {
3796+
} elseif (!$this->_equals($hmac, $this->hmac_check->hash(pack('NNCa*', $this->get_seq_no, $packet_length, $padding_length, $payload . $padding)))) {
37973797
user_error('Invalid HMAC');
37983798
return false;
37993799
}
@@ -5693,4 +5693,33 @@ function bytesUntilKeyReexchange($bytes)
56935693
{
56945694
$this->doKeyReexchangeAfterXBytes = $bytes;
56955695
}
5696+
5697+
/**
5698+
* Constant time equality testing
5699+
*
5700+
* Pretty much copy / pasted from Crypt/RSA.php
5701+
*
5702+
* @access private
5703+
* @param string $x
5704+
* @param string $y
5705+
* @return bool
5706+
*/
5707+
function _equals($x, $y)
5708+
{
5709+
if (function_exists('hash_equals')) {
5710+
return hash_equals($x, $y);
5711+
}
5712+
5713+
if (strlen($x) != strlen($y)) {
5714+
return false;
5715+
}
5716+
5717+
$result = "\0";
5718+
$x^= $y;
5719+
for ($i = 0; $i < strlen($x); $i++) {
5720+
$result|= $x[$i];
5721+
}
5722+
5723+
return $result === "\0";
5724+
}
56965725
}

0 commit comments

Comments
 (0)