From 14ffa2c2d61a224db925e4c31287f034934b7286 Mon Sep 17 00:00:00 2001 From: Jeremy Grossmann Date: Sat, 7 Mar 2026 22:22:16 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"Fix=20QEMU=20serial=20console=20artif?= =?UTF-8?q?acts=20by=20filtering=20ANSI=20CPR=20responses=20in=20=E2=80=A6?= =?UTF-8?q?"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gns3server/utils/asyncio/telnet_server.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/gns3server/utils/asyncio/telnet_server.py b/gns3server/utils/asyncio/telnet_server.py index 092b8605a..b13c405cd 100644 --- a/gns3server/utils/asyncio/telnet_server.py +++ b/gns3server/utils/asyncio/telnet_server.py @@ -20,7 +20,6 @@ import socket import asyncio import asyncio.subprocess import struct -import re import logging log = logging.getLogger(__name__) @@ -58,7 +57,6 @@ NAWS = 31 # Negotiate About Window Size LINEMO = 34 # Line Mode READ_SIZE = 1024 -CPR_RESPONSE = re.compile(br"\x1b\[[0-9]{1,4}(;[0-9]{1,4})?R") class TelnetConnection(object): @@ -288,11 +286,6 @@ class AsyncioTelnetServer: if IAC in data: data = await self._IAC_parser(data, network_reader, network_writer, connection) - # Some terminal clients may send ANSI cursor position reports - # (e.g. ESC[1;80R) when attaching to a serial console. Those - # responses can show up as spurious characters at the shell prompt. - data = CPR_RESPONSE.sub(b"", data) - if len(data) == 0: continue