Fix TypeError with IAC escaping
authorJeremy Stanley <fungi@yuggoth.org>
Sun, 21 Jan 2018 23:39:45 +0000 (23:39 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Sun, 21 Jan 2018 23:39:45 +0000 (23:39 +0000)
commit0c50d321bc2ecb103c9e80896f6d79e77f1a72b2
treeb6c70f6aea3867790e0ea176fde40d8fb0732696
parent2fd7b7ea43982b6369c6596afc5041a2adfe6c98
Fix TypeError with IAC escaping

Declare the literal newline as a byte type when analyzing an input
sequence with a double IAC byte, fixing a lingering crash which
raised a TypeError in negotiate_telnet_options(). Add regression
testing for proper handling and deduplication of an inline IAC pair.
While we're here, improve the log message about undecodeable UTF-8
sequences to be clear it's not just some of the bytes which were
discarded.
mudpy/misc.py
mudpy/telnet.py
mudpy/tests/selftest.py