Skip to content

Commit

Permalink
Merge branch '3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Nov 4, 2023
2 parents ec6338e + 3ecde6b commit 6f4559f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion phpseclib/Net/SSH2.php
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,20 @@ private function key_exchange($kexinit_payload_server = false): bool
['hmac-sha1-96', 'hmac-md5-96']
));
}
break;
case substr($this->server_identifier, 0, 24) == 'SSH-2.0-TurboFTP_SERVER_':
if (!isset($preferred['server_to_client']['crypt'])) {
$s2c_encryption_algorithms = array_values(array_diff(
$s2c_encryption_algorithms,
['aes128-gcm@openssh.com', 'aes256-gcm@openssh.com']
));
}
if (!isset($preferred['client_to_server']['crypt'])) {
$c2s_encryption_algorithms = array_values(array_diff(
$c2s_encryption_algorithms,
['aes128-gcm@openssh.com', 'aes256-gcm@openssh.com']
));
}
}

$client_cookie = Random::string(16);
Expand Down Expand Up @@ -2036,7 +2050,7 @@ private function login_helper(string $username, $password = null): bool
return $this->login_helper($username, $password);
}
$this->disconnect_helper(DisconnectReason::CONNECTION_LOST);
throw new ConnectionClosedException('Connection closed by server');
throw $e;
}

[$type, $service] = Strings::unpackSSH2('Cs', $response);
Expand Down

0 comments on commit 6f4559f

Please sign in to comment.