aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_message.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2014-06-16 11:19:41 +0200
committerHans Nilsson <[email protected]>2014-06-16 11:19:41 +0200
commit94f97e8f76bdde01ca18b0e8617c87fd3862ffa4 (patch)
treec313f94244d982d22fd6aae0a7fababfadf8fabc /lib/ssh/src/ssh_message.erl
parent6c504f08ae5c35d2b86b31a5878d40d7957a3db8 (diff)
parent3c37eaa0fe0841d035d99d622c234253aadf7e3d (diff)
downloadotp-94f97e8f76bdde01ca18b0e8617c87fd3862ffa4.tar.gz
otp-94f97e8f76bdde01ca18b0e8617c87fd3862ffa4.tar.bz2
otp-94f97e8f76bdde01ca18b0e8617c87fd3862ffa4.zip
Merge branch 'hans/ssh/decode_encode_fix/OTP-11972' into maint
* hans/ssh/decode_encode_fix/OTP-11972: ssh: Prepare for release ssh: Accept disconnect msgs without language tag
Diffstat (limited to 'lib/ssh/src/ssh_message.erl')
-rw-r--r--lib/ssh/src/ssh_message.erl9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/ssh/src/ssh_message.erl b/lib/ssh/src/ssh_message.erl
index 8d6c77c0ed..e855f3cb08 100644
--- a/lib/ssh/src/ssh_message.erl
+++ b/lib/ssh/src/ssh_message.erl
@@ -461,6 +461,15 @@ decode(<<?BYTE(?SSH_MSG_DISCONNECT), ?UINT32(Code),
language = Lang
};
+%% Accept bad disconnects from ancient openssh clients that doesn't send language tag. Use english as a work-around.
+decode(<<?BYTE(?SSH_MSG_DISCONNECT), ?UINT32(Code),
+ ?UINT32(Len0), Desc:Len0/binary>>) ->
+ #ssh_msg_disconnect{
+ code = Code,
+ description = unicode:characters_to_list(Desc),
+ language = <<"en">>
+ };
+
decode(<<?SSH_MSG_NEWKEYS>>) ->
#ssh_msg_newkeys{};