mirror of
https://github.com/danog/phpseclib.git
synced 2024-11-27 04:46:26 +01:00
- if you want to use UTF-8 encoded passwords encode them as UTF-8 yourself (ie. save your PHP script as UTF-8 without BOM; thanks, gruberroland!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@160 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
parent
737ea2c9e9
commit
332726db74
@ -1338,10 +1338,9 @@ class Net_SSH2 {
|
||||
return $this->_privatekey_login($username, $password);
|
||||
}
|
||||
|
||||
$utf8_password = utf8_encode($password);
|
||||
$packet = pack('CNa*Na*Na*CNa*',
|
||||
NET_SSH2_MSG_USERAUTH_REQUEST, strlen($username), $username, strlen('ssh-connection'), 'ssh-connection',
|
||||
strlen('password'), 'password', 0, strlen($utf8_password), $utf8_password
|
||||
strlen('password'), 'password', 0, strlen($password), $password
|
||||
);
|
||||
|
||||
if (!$this->_send_binary_packet($packet)) {
|
||||
|
Loading…
Reference in New Issue
Block a user