Commit 0173c638 authored by Christian Kandeler's avatar Christian Kandeler

SSH: Use "none" authentication type in case of an empty password.

The "password" type as used until now should also be okay, but does not
work with dropbear.

Task-number: QTCREATORBUG-14913
Change-Id: I2fac255acf326e509f68c9de97c3cc9f00b2a373
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent cf277acb
...@@ -112,9 +112,12 @@ void SshOutgoingPacket::generateServiceRequest(const QByteArray &service) ...@@ -112,9 +112,12 @@ void SshOutgoingPacket::generateServiceRequest(const QByteArray &service)
void SshOutgoingPacket::generateUserAuthByPasswordRequestPacket(const QByteArray &user, void SshOutgoingPacket::generateUserAuthByPasswordRequestPacket(const QByteArray &user,
const QByteArray &service, const QByteArray &pwd) const QByteArray &service, const QByteArray &pwd)
{ {
init(SSH_MSG_USERAUTH_REQUEST).appendString(user).appendString(service) init(SSH_MSG_USERAUTH_REQUEST).appendString(user).appendString(service);
.appendString("password").appendBool(false).appendString(pwd) if (pwd.isEmpty())
.finalize(); appendString("none"); // RFC 4252, 5.2
else
appendString("password").appendBool(false).appendString(pwd);
finalize();
} }
void SshOutgoingPacket::generateUserAuthByPublicKeyRequestPacket(const QByteArray &user, void SshOutgoingPacket::generateUserAuthByPublicKeyRequestPacket(const QByteArray &user,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment