csi: ignore 'CSI 21 t' - report window title

It's not widely used (don't know _any_ application that uses it), and
can be used to trick users to run unwanted commands.
This commit is contained in:
Daniel Eklöf 2025-01-07 12:58:44 +01:00
parent 42f78b7f9c
commit 8e425c4e97
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

4
csi.c
View file

@ -1354,10 +1354,14 @@ csi_dispatch(struct terminal *term, uint8_t final)
}
case 21: {
#if 0 /* Disabled for now, see #1894 */
char reply[3 + strlen(term->window_title) + 2 + 1];
int chars = xsnprintf(
reply, sizeof(reply), "\033]l%s\033\\", term->window_title);
term_to_slave(term, reply, chars);
#else
LOG_WARN("CSI 21 t (report window title) ignored");
#endif
break;
}