Support clients using CR+NUL to signal EOL
authorJeremy Stanley <fungi@yuggoth.org>
Sun, 26 Aug 2018 17:42:15 +0000 (17:42 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Sun, 26 Aug 2018 19:22:15 +0000 (19:22 +0000)
IETF RFC 854 requires that a Telnet server accept CR+NUL
interchangeably with CR+LF to indicate end of an input line from any
NVT (client). CR+NUL also happens to be the default behavior of
popular Telnet clients specifically when communicating on TCP port
23 (as opposed to non-default ports where more liberal protocol
fallbacks get employed). Previously these clients would need to `set
crlf` in their .telnetrc or at a telnet> command prompt as a
workaround.

Alter the selftest framework to send \r\0 from the NVT as an EOL to
make sure this does not regress, and add a test to explicitly end a
command with a \r\n just to make sure we can continue to support
CR+LF from clients.


No differences found