mirror of https://github.com/wolfSSL/wolfssh.git
be more lenient on CR with protocol exchange
parent
de794125f0
commit
cbd166a43d
|
@ -1404,6 +1404,15 @@ static int GetInputText(WOLFSSH* ssh, byte** pEol)
|
|||
|
||||
eol = WSTRNSTR((const char*)ssh->inputBuffer.buffer, "\r\n",
|
||||
ssh->inputBuffer.length);
|
||||
#ifndef WOLFSSH_STRICT_PROTOCOL_EXCHANGE
|
||||
/* section 4.2 in RFC 4253 states that can be lenient on the CR for
|
||||
* interop with older or undocumented versions of SSH */
|
||||
if (!eol) {
|
||||
WLOG(WS_LOG_DEBUG, "Checking for older version of protocol exchange");
|
||||
eol = WSTRNSTR((const char*)ssh->inputBuffer.buffer, "\n",
|
||||
ssh->inputBuffer.length);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (eol)
|
||||
gotLine = 1;
|
||||
|
|
Loading…
Reference in New Issue