mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-21 12:42:25 +00:00
More efficient is digit check
Also fixes the previous check allowing trailing newlines
This commit is contained in:
parent
35f88faeea
commit
57bb144d96
1 changed files with 3 additions and 3 deletions
|
|
@ -1726,10 +1726,10 @@ class Window:
|
|||
def handle_remote_echo(self, msg: memoryview) -> None:
|
||||
# This is used by the ssh kitten to flush garbage from the tty on exit
|
||||
data = base64_decode(msg)
|
||||
if re.match(rb'\d+$', data) is None:
|
||||
log_error(f'Invalid echo message received from client: {data!r}')
|
||||
else:
|
||||
if data.isdigit():
|
||||
self.write_to_child(data)
|
||||
else:
|
||||
log_error(f'Invalid echo message received from client: {data!r}')
|
||||
|
||||
def handle_remote_ssh(self, msg: memoryview) -> None:
|
||||
from kittens.ssh.utils import get_ssh_data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue