From 6a0b0418c2b01cfb78bdc4367c13856f04c054a7 Mon Sep 17 00:00:00 2001 From: Demi Marie Obenour Date: Fri, 25 Oct 2024 16:24:14 -0400 Subject: [PATCH] Understand Assuan comments Assuan comments start with '#' and must be ignored. Do not send them to the client. --- splitgpg2/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/splitgpg2/__init__.py b/splitgpg2/__init__.py index 888fec4..4a10538 100755 --- a/splitgpg2/__init__.py +++ b/splitgpg2/__init__.py @@ -1057,6 +1057,9 @@ async def handle_agent_response(self, untrusted_line = await self.agent_reader.readline() untrusted_line = untrusted_line.rstrip(b'\n') self.log_io('A >>>', untrusted_line) + if untrusted_line.startswith(b'#'): + # Comment, ignore + return True untrusted_res, untrusted_args = extract_args(untrusted_line) if untrusted_res in (b'D', b'S'): # passthrough to the client