From bcc2ad7f5cb4622f25579d12bf135fe62bdc730c Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Mon, 11 May 2026 23:17:11 -0400 Subject: [PATCH] Use shlex.quote for remote_cmd in build_ssh_command Matches the pattern already used in monitor.py's _ssh_batch(); prevents quoting breakage if shlex.quote(iface) emits single-quoted tokens inside the remote command string. Co-Authored-By: Claude Sonnet 4.6 --- diagnose.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diagnose.py b/diagnose.py index 2577fa0..d0879ec 100644 --- a/diagnose.py +++ b/diagnose.py @@ -78,7 +78,7 @@ class DiagnosticsRunner: f'ssh -o StrictHostKeyChecking=accept-new -o ConnectTimeout=5 ' f'-o BatchMode=yes -o LogLevel=ERROR ' f'-o ServerAliveInterval=10 -o ServerAliveCountMax=2 ' - f'root@{ip_q} \'{remote_cmd}\'' + f'root@{ip_q} {shlex.quote(remote_cmd)}' ) # ------------------------------------------------------------------