News for hackers. Stuff that matters.
Re:Permission.site by judge2020 on Friday March 26, 2021 @12:40AM (#26588814)
Copying to the clipboard is unrestricted even without a click, but reading clipboard text requires a permission popup.

https://web.dev/async-clipboard/#security-and-permissions:~:...

Re:Permission.site by axaxs on Friday March 26, 2021 @12:45AM (#26588823)
This is exactly what I was thinking.

Theoretically, a bad actor could have a site or even inject code onto a site with an innocuous looking bash command, but upon copy injects say, rm -rf ~ \n

Re:Permission.site by judge2020 on Friday March 26, 2021 @12:52AM (#26588856)
This can be done even without the clipboard API - See https://thejh.net/misc/website-terminal-copy-paste and further https://security.stackexchange.com/a/113630/96942
Re:Permission.site by kelnos on Friday March 26, 2021 @01:43AM (#26589081)
Seems like this requires you to select some text (which includes some text that's been hidden using CSS tricks) and copy it. So it's not like the website can just arbitrary write to your clipboard without your interaction? (Still, this is kinda scary and I didn't know about this.)
Re:Permission.site by input_sh on Friday March 26, 2021 @06:20AM (#26590437)
They can append the message to whatever you'll actually want to copy, which is how websites used to do things like this.

- Copied from https://news.ycombinator.com/item?id=26590437

Re:Permission.site by axaxs on Friday March 26, 2021 @01:05AM (#26588911)
Really interesting(and terrifying) reads, thank you.
Re:Permission.site by SilverRed on Friday March 26, 2021 @01:27AM (#26589003)
The real bug is that \n pasted in to the terminal counts as hitting enter. iTerm has fixed this but every linux terminal I have used has this issue.
Re:Permission.site by shakna on Friday March 26, 2021 @02:36AM (#26589350)
Every Linux terminal I've used has a pop-up when there's a new newline. Like this, which in this case is xfce4-terminal. [0]

[0] https://i.imgur.com/ubCXASQ.png

Re:Permission.site by judge2020 on Friday March 26, 2021 @02:11PM (#26595130)
Re:Permission.site by axaxs on Friday March 26, 2021 @05:52PM (#26597421)
Gnome-terminal, probably the largest by user base, does not sadly.
Re:Permission.site by PowerBar on Friday March 26, 2021 @05:03AM (#26590066)
Huh, I've never gotten a prompt like that in Terminator.
Re:Permission.site by vanviegen on Friday March 26, 2021 @01:48AM (#26589105)
Is it still possible to paste into vim, for example? If so, how does the terminal make the distinction?
Re:Permission.site by kelnos on Friday March 26, 2021 @01:40AM (#26589065)
Is it? When I click the "Write" button, it turns green, but when I click "Write (delayed)", after a while it turns red. So it seems (at least on Firefox 87) even the clipboard write API is restricted to user-action event handlers.