From a2a704492b9f4d2408d180f7aeeacf4c789a1d67 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sat, 30 May 2020 21:56:18 +0200 Subject: config.def.h: add an option allowwindowops, by default off (secure) Similar to the xterm AllowWindowOps option, this is an option to allow or disallow certain (non-interactive) operations that can be insecure or exploited. NOTE: xsettitle() is not guarded by this because st does not support printing the window title. Else this could be exploitable (arbitrary code execution). Similar problems have been found in the past in other terminal emulators. The sequence for base64-encoded clipboard copy is now guarded because it allows a sequence written to the terminal to manipulate the clipboard of the running user non-interactively, for example: printf '\x1b]52;0;ZWNobyBoaQ0=\a' --- st.h | 1 + 1 file changed, 1 insertion(+) (limited to 'st.h') diff --git a/st.h b/st.h index d978458..3d351b6 100644 --- a/st.h +++ b/st.h @@ -118,6 +118,7 @@ extern char *stty_args; extern char *vtiden; extern wchar_t *worddelimiters; extern int allowaltscreen; +extern int allowwindowops; extern char *termname; extern unsigned int tabspaces; extern unsigned int defaultfg; -- cgit v1.2.3-13-gbd6f