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');