>
they still can’t read from the clipboardIncorrect; the API is here [0].
[0]: https://www.w3.org/TR/clipboard-apis/#dom-clipboard-read
It is at least supposed to be hidden behind a permission. What's the default for that permission though? I sure hope Google^H^H^H^H^H^HMicrosoft^H^H^H^H^H^H^H^H^Hsome evildoer doesn't find a way to override your permission setting. A reset of configuration data after an automatic update might do the trick...
> And your [8] seems to be about the user deciding to paste unsafe content — totally different issue, isn’t it?
Perhaps you are right. I won't claim to fully understand how tty programs work. However:
* `emacs` documentation describes an ability to interact with the user's system clipboard [1].
* `tmux` integrates with the user's system clipboard [2].
* `mosh` apparently caches the user's system clipboard [3].
* `vim` has special registers to represent the user's system clipboard [4] [5].
If the system is using dbus (nearly every Linux based OS), it's pretty easy to do. Here's a python script using GTK to do so [6]. A high level overview of the clipboard is described in the freedesktop specification [7].
I think it's really unfortunate that desktop and CLI software is so insecure.
[1]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Cl...
[2]: https://superuser.com/a/1336764
[3]: https://superuser.com/a/1336764
[4]: https://vi.stackexchange.com/a/96
[5]: https://vim.fandom.com/wiki/Accessing_the_system_clipboard
[6]: https://stackoverflow.com/a/21337063/1111557
[7]: https://specifications.freedesktop.org/clipboards-spec/clipb...