commit - 0f8b40652bca0670f1f0bda069bbc55f8b5e364d
commit + a2a704492b9f4d2408d180f7aeeacf4c789a1d67
blob - 293e00c4284d411fd80bbe9a1f3cd437068a57bd
blob + 6f05dce6aaec83db925b9ec9af40284b4bf13fd7
--- config.def.h
+++ config.def.h
/* 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
blob - 2d901ab66e2436c95906d5edeb77ee05e7ae5058
blob + ef8abd5d04928739f2bb4004e26b6c82da8098b6
--- st.c
+++ st.c
xsettitle(strescseq.args[1]);
return;
case 52:
- if (narg > 2) {
+ if (narg > 2 && allowwindowops) {
dec = base64dec(strescseq.args[2]);
if (dec) {
xsetsel(dec);
blob - d978458425934fa1db8c5c03a62c917e244d8933
blob + 3d351b69ea3746bf80de58a1ce1a2b2a4dc30ba5
--- st.h
+++ st.h
extern char *vtiden;
extern wchar_t *worddelimiters;
extern int allowaltscreen;
+extern int allowwindowops;
extern char *termname;
extern unsigned int tabspaces;
extern unsigned int defaultfg;