3 ms·
> they still can’t read from the clipboard Incorrect; the API is here [0]. [0]: https://www.w3.org/TR/clipboard-apis/#dom-clipboard-read https://www.w3.org/TR
by inetknght 6y ago
> they still can’t read from the clipboard
Incorrect; the API is here [0].
[0]: https://www.w3.org/TR/clipboard-apis/#dom-clipboard-read 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/Clipboard.html https://www.gnu.org/software/emacs/manual/html_node/emacs/Cl...
[2]: https://superuser.com/a/1336764 https://superuser.com/a/1336764
[3]: https://superuser.com/a/1336764 https://superuser.com/a/1336764
[4]: https://vi.stackexchange.com/a/96 https://vi.stackexchange.com/a/96
[5]: https://vim.fandom.com/wiki/Accessing_the_system_clipboard https://vim.fandom.com/wiki/Accessing_the_system_clipboard
[6]: https://stackoverflow.com/a/21337063/1111557 https://stackoverflow.com/a/21337063/1111557
[7]: https://specifications.freedesktop.org/clipboards-spec/clipboards-latest.txt https://specifications.freedesktop.org/clipboards-spec/clipb...
- leephillips 6y agoOf course there are APIs for accessing the clipboard. I probably use Vim’s clipboard registers 300 times a day. None of this has anything to do with closed source programs reading the clipboard without permission. Speculating that somehow an app might “override your permission setting” is not really informative. There might be any number of exploits.
- inetknght 6y ago> None of this has anything to do with closed source programs reading the clipboard without permission. This has everything to do with closed source programs reading the clipboard without permission since there are no permissions involved in desktop operating systems.
- leephillips 6y agoOh, OK. But all of your examples are open source programs. And there is a reason I only run open source programs on the desktop (except maybe for a driver or two, I guess, possibly). I'm not afraid that Vim is scraping my clipboard and selling the contents to an advertising firm. Because it’s not.