From 77b00c3169c5b395407a1f8209f19ba6ac1f8fdb Mon Sep 17 00:00:00 2001 From: terrafrost Date: Wed, 22 Nov 2023 04:58:39 -0600 Subject: [PATCH] CS adjustment --- phpseclib/Exception/OutOfBoundsException.php | 9 +++++++++ phpseclib/Math/BinaryField.php | 3 ++- phpseclib/Net/SSH2.php | 8 +++----- 3 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 phpseclib/Exception/OutOfBoundsException.php diff --git a/phpseclib/Exception/OutOfBoundsException.php b/phpseclib/Exception/OutOfBoundsException.php new file mode 100644 index 00000000..98c2c956 --- /dev/null +++ b/phpseclib/Exception/OutOfBoundsException.php @@ -0,0 +1,9 @@ +get_binary_packet(); - list($type) = Strings::unpackSSH2('C', $response); + [$type] = Strings::unpackSSH2('C', $response); } - list($service) = Strings::unpackSSH2('s', $response); - - [$type, $service] = Strings::unpackSSH2('Cs', $response); + [$service] = Strings::unpackSSH2('s', $response); if ($type != MessageType::SERVICE_ACCEPT || $service != 'ssh-userauth') { $this->disconnect_helper(DisconnectReason::PROTOCOL_ERROR); throw new UnexpectedValueException('Expected SSH_MSG_SERVICE_ACCEPT');