From 354ba8dad84eaf262c90657f9020c2b482fdd6ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 7 Jan 2025 13:00:10 +0100 Subject: [PATCH] osc: ignore 'OSC 176 ?' - report app ID It's not widely used (don't know _any_ application that uses it), and can be used to trick users to run unwanted commands. --- osc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osc.c b/osc.c index 17639c19..e335dc61 100644 --- a/osc.c +++ b/osc.c @@ -1498,6 +1498,7 @@ osc_dispatch(struct terminal *term) case 176: if (string[0] == '?' && string[1] == '\0') { +#if 0 /* Disabled for now, see #1894 */ const char *terminator = term->vt.osc.bel ? "\a" : "\033\\"; char *reply = xasprintf( "\033]176;%s%s", @@ -1506,6 +1507,9 @@ osc_dispatch(struct terminal *term) term_to_slave(term, reply, strlen(reply)); free(reply); +#else + LOG_WARN("OSC-176 app-id query ignored"); +#endif break; }