From dc15f18bc60524ab5ec5609cb296fe1699405db7 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Wed, 24 Jul 2024 23:57:54 -0500 Subject: [PATCH] fix bad merge --- phpseclib/Net/SSH2.php | 4 ++-- tests/Unit/Net/SSH2UnitTest.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 5bdb9cef..a1cfd3f3 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1523,7 +1523,7 @@ class SSH2 $this->updateLogHistory('UNKNOWN (32)', 'SSH_MSG_KEXDH_GEX_INIT'); } - $response = $this->get_binary_packet_or_close(constant($serverKexReplyMessage)); + $response = $this->get_binary_packet_or_close($serverKexReplyMessage); [ $type, @@ -2394,7 +2394,7 @@ class SSH2 $response = $this->get_binary_packet_or_close( MessageType::USERAUTH_SUCCESS, MessageType::USERAUTH_FAILURE, - MessageType::USERAUTH_PK_OK + MessageTypeExtra::USERAUTH_PK_OK ); [$type] = Strings::unpackSSH2('C', $response); diff --git a/tests/Unit/Net/SSH2UnitTest.php b/tests/Unit/Net/SSH2UnitTest.php index d66607d7..3489c48a 100644 --- a/tests/Unit/Net/SSH2UnitTest.php +++ b/tests/Unit/Net/SSH2UnitTest.php @@ -287,7 +287,7 @@ class SSH2UnitTest extends PhpseclibTestCase }); $ssh->expects($this->once()) ->method('send_binary_packet') - ->with(Strings::packSSH2('CNs', NET_SSH2_MSG_CHANNEL_DATA, 1, 'hello world')); + ->with(Strings::packSSH2('CNs', SSH2\MessageType::CHANNEL_DATA, 1, 'hello world')); self::setVar($ssh, 'server_channels', [1 => 1]); self::setVar($ssh, 'packet_size_client_to_server', [1 => 0x7FFFFFFF]); self::setVar($ssh, 'window_size_client_to_server', [1 => 0]); @@ -314,7 +314,7 @@ class SSH2UnitTest extends PhpseclibTestCase }); $ssh->expects($this->once()) ->method('send_binary_packet') - ->with(Strings::packSSH2('CNs', NET_SSH2_MSG_CHANNEL_DATA, 1, ' world')); + ->with(Strings::packSSH2('CNs', SSH2\MessageType::CHANNEL_DATA, 1, ' world')); self::setVar($ssh, 'channel_buffers_write', [1 => 'hello']); self::setVar($ssh, 'server_channels', [1 => 1]); self::setVar($ssh, 'packet_size_client_to_server', [1 => 0x7FFFFFFF]); @@ -345,7 +345,7 @@ class SSH2UnitTest extends PhpseclibTestCase }); $ssh->expects($this->once()) ->method('send_binary_packet') - ->with(Strings::packSSH2('CNs', NET_SSH2_MSG_CHANNEL_DATA, 1, 'hello')); + ->with(Strings::packSSH2('CNs', SSH2\MessageType::CHANNEL_DATA, 1, 'hello')); self::setVar($ssh, 'server_channels', [1 => 1]); self::setVar($ssh, 'packet_size_client_to_server', [1 => 0x7FFFFFFF]); self::setVar($ssh, 'window_size_client_to_server', [1 => 5]);