M config.def.h => config.def.h +4 -0
@@ 43,6 43,10 @@ static unsigned int tripleclicktimeout = 600;
/* alt screens */
int allowaltscreen = 1;
+/* allow certain non-interactive (insecure) window operations such as:
+ setting the clipboard text */
+int allowwindowops = 0;
+
/*
* draw latency range in ms - from new content/keypress/etc until drawing.
* within this range, st draws when content stops arriving (idle). mostly it's
M st.c => st.c +1 -1
@@ 1861,7 1861,7 @@ strhandle(void)
xsettitle(strescseq.args[1]);
return;
case 52:
- if (narg > 2) {
+ if (narg > 2 && allowwindowops) {
dec = base64dec(strescseq.args[2]);
if (dec) {
xsetsel(dec);
M st.h => st.h +1 -0
@@ 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;