python / cpython

The Python programming language
https://www.python.org
Other
62.35k stars 29.94k forks source link

telnetlib.Telnet does not process DATA MARK (DM) #45094

Closed e7427abb-b604-4940-a3f9-64bdc94d29d4 closed 15 years ago

e7427abb-b604-4940-a3f9-64bdc94d29d4 commented 17 years ago
BPO 1737737
Nosy @jackdied

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields: ```python assignee = 'https://github.com/jackdied' closed_at = created_at = labels = ['extension-modules', 'invalid'] title = 'telnetlib.Telnet does not process DATA MARK (DM)' updated_at = user = 'https://bugs.python.org/norbertb' ``` bugs.python.org fields: ```python activity = actor = 'jackdied' assignee = 'jackdied' closed = True closed_date = closer = 'jackdied' components = ['Extension Modules'] creation = creator = 'norbert_b' dependencies = [] files = [] hgrepos = [] issue_num = 1737737 keywords = [] message_count = 3.0 messages = ['32331', '85041', '85607'] nosy_count = 2.0 nosy_names = ['jackdied', 'norbert_b'] pr_nums = [] priority = 'normal' resolution = 'not a bug' stage = None status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue1737737' versions = [] ```

e7427abb-b604-4940-a3f9-64bdc94d29d4 commented 17 years ago

According to RFC854, the DATA MARK (DM, character code 0xf2) is a control character of the TELNET protocol that should be removed from the input stream (see 'THE TELNET "SYNCH" SIGNAL' in RFC854). Unfortunately the telnetlib.Telnet implementation shipped with Python version 2.5 simply passes the DM char through..

jackdied commented 15 years ago

assigning all open telnetlib items to myself

jackdied commented 15 years ago

RFC 854 says that DM, like all other commands, is only valid when preceded by an IAC. telnetlib does filter these out appropriately (I just added tests for it in r71302 and it behaves appropriately).