SSH: Fix parsing of server id.

The current implementation is a bit sloppy, so one can construct certain
invalid strings that will be accepted as well as certain valid ones that
will be rejected. The new checks are much more precise.
Most importantly in practice, the version string "1.99" sent by some
older servers is now accepted, as required by the RFC.

Change-Id: Ib35c27d3a3bc4aea259b9a0dad66817435d95c0a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Christian Kandeler
2012-09-26 10:57:19 +02:00
parent 3df129d4f6
commit e2cb3acdaa
2 changed files with 61 additions and 18 deletions

View File

@@ -165,6 +165,7 @@ private:
SshConnection *m_conn;
quint64 m_lastInvalidMsgSeqNr;
QByteArray m_serverId;
bool m_serverHasSentDataBeforeId;
};
} // namespace Internal