You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by lg...@apache.org on 2015/11/17 14:34:56 UTC
mina-sshd git commit: Make sure reported Putty client version starts
with SSH-2.0-
Repository: mina-sshd
Updated Branches:
refs/heads/master 1912eddd1 -> 5ed49432e
Make sure reported Putty client version starts with SSH-2.0-
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/5ed49432
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/5ed49432
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/5ed49432
Branch: refs/heads/master
Commit: 5ed49432e857b8963d7bb1c834166f127369a9dd
Parents: 1912edd
Author: Lyor Goldstein <lg...@vmware.com>
Authored: Tue Nov 17 15:34:45 2015 +0200
Committer: Lyor Goldstein <lg...@vmware.com>
Committed: Tue Nov 17 15:34:45 2015 +0200
----------------------------------------------------------------------
.../java/org/apache/sshd/server/channel/PuttyRequestHandler.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/5ed49432/sshd-core/src/main/java/org/apache/sshd/server/channel/PuttyRequestHandler.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/channel/PuttyRequestHandler.java b/sshd-core/src/main/java/org/apache/sshd/server/channel/PuttyRequestHandler.java
index 388a871..82c741c 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/channel/PuttyRequestHandler.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/channel/PuttyRequestHandler.java
@@ -101,6 +101,7 @@ public class PuttyRequestHandler extends AbstractChannelRequestHandler {
*/
public static boolean isPuttyClient(String clientVersion) {
return (GenericUtils.length(clientVersion) > Session.DEFAULT_SSH_VERSION_PREFIX.length())
+ && clientVersion.startsWith(Session.DEFAULT_SSH_VERSION_PREFIX)
&& clientVersion.toLowerCase().contains("putty");
}