diff options
author | Hans Nilsson <[email protected]> | 2014-02-13 17:51:07 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2014-02-13 17:51:07 +0100 |
commit | d10a115ab1e66938531b87bef20f886013e7b96b (patch) | |
tree | b2a4db6031ebeda876ef0d9ca1aacc3bf918eec4 | |
parent | e3f1a078cf8a03d4adbb1f71702f3daec2f15119 (diff) | |
parent | b2dc0478ddaef9898b6672a469c06aee63e9f830 (diff) | |
download | otp-d10a115ab1e66938531b87bef20f886013e7b96b.tar.gz otp-d10a115ab1e66938531b87bef20f886013e7b96b.tar.bz2 otp-d10a115ab1e66938531b87bef20f886013e7b96b.zip |
Merge branch 'hans/ssh/decodebug/OTP_11698'
* hans/ssh/decodebug/OTP_11698:
ssh: Changed order of decode clauses to temp fix decode error
-rw-r--r-- | lib/ssh/src/ssh_message.erl | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/ssh/src/ssh_message.erl b/lib/ssh/src/ssh_message.erl index 95016a9832..8d6c77c0ed 100644 --- a/lib/ssh/src/ssh_message.erl +++ b/lib/ssh/src/ssh_message.erl @@ -380,27 +380,30 @@ decode(<<?BYTE(?SSH_MSG_USERAUTH_BANNER), language = Lang }; +decode(<<?BYTE(?SSH_MSG_USERAUTH_INFO_REQUEST), ?UINT32(Len0), Name:Len0/binary, + ?UINT32(Len1), Inst:Len1/binary, ?UINT32(Len2), Lang:Len2/binary, + ?UINT32(NumPromtps), Data/binary>>) -> + #ssh_msg_userauth_info_request{ + name = Name, + instruction = Inst, + language_tag = Lang, + num_prompts = NumPromtps, + data = Data}; + +%%% Unhandled message, also masked by same 1:st byte value as ?SSH_MSG_USERAUTH_INFO_REQUEST: decode(<<?BYTE(?SSH_MSG_USERAUTH_PK_OK), ?UINT32(Len), Alg:Len/binary, KeyBlob/binary>>) -> #ssh_msg_userauth_pk_ok{ algorithm_name = Alg, key_blob = KeyBlob }; +%%% Unhandled message, also masked by same 1:st byte value as ?SSH_MSG_USERAUTH_INFO_REQUEST: decode(<<?BYTE(?SSH_MSG_USERAUTH_PASSWD_CHANGEREQ), ?UINT32(Len0), Prompt:Len0/binary, ?UINT32(Len1), Lang:Len1/binary>>) -> #ssh_msg_userauth_passwd_changereq{ prompt = Prompt, languge = Lang }; -decode(<<?BYTE(?SSH_MSG_USERAUTH_INFO_REQUEST), ?UINT32(Len0), Name:Len0/binary, - ?UINT32(Len1), Inst:Len1/binary, ?UINT32(Len2), Lang:Len2/binary, - ?UINT32(NumPromtps), Data/binary>>) -> - #ssh_msg_userauth_info_request{ - name = Name, - instruction = Inst, - language_tag = Lang, - num_prompts = NumPromtps, - data = Data}; decode(<<?BYTE(?SSH_MSG_USERAUTH_INFO_RESPONSE), ?UINT32(Num), Data/binary>>) -> #ssh_msg_userauth_info_response{ |