forked from qt-creator/qt-creator
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: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -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,
|
||||||
|
Reference in New Issue
Block a user