From a6da0ac6cab92f71f9b3d02328980b2146cebb7e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 7 Nov 2023 17:27:45 +0530 Subject: [PATCH] Log bad remote commands --- kitty/remote_control.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kitty/remote_control.py b/kitty/remote_control.py index f24396db3..9ee3fdb05 100644 --- a/kitty/remote_control.py +++ b/kitty/remote_control.py @@ -58,8 +58,10 @@ def parse_cmd(serialized_cmd: memoryview, encryption_key: EllipticCurveKey) -> D try: pcmd = json.loads(bytes(serialized_cmd)) except Exception: + log_error('Failed to parse JSON payload of remote command, ignoring it') return {} if not isinstance(pcmd, dict) or 'version' not in pcmd: + log_error('JSON payload of remote command is invalid, must be an object with a version field') return {} pcmd.pop('password', None) if 'encrypted' in pcmd: