Display clipboard contents in the multiple line warning dialog box when pasting into Terminal #11103

Open
opened 2026-01-31 02:38:41 +00:00 by claunia · 0 comments
Owner

Originally created by @tfennel on GitHub (Oct 21, 2020).

Evil Copy Paste Protection!

Background

It just recently came to my attention that you can do some scary stuff by hiding evil commands inside seemingly safe commands copied from the internet!
As a mostly copy paste developer, I copy things all the time! I never even thought I could copy something and what actually ended up on my clipboard would be something else!

See this site for details:
https://briantracy.xyz/writing/copy-paste-shell.html
This is the tweet that lead to me learning about this:
https://twitter.com/JGamblin/status/1317987698825625600?s=19

So basically, you can copy one thing and then end up pasting another!

What to do?

Well, @cinnamon-msft let me know Terminal already does this:
warning

So what if it also showed the contents of the clipboard so you could see what's really on the clipboard? Like this:
warning2

That's it! That's the idea!

Originally created by @tfennel on GitHub (Oct 21, 2020). # Evil Copy Paste Protection! ## Background It just recently came to my attention that you can do some scary stuff by hiding evil commands inside seemingly safe commands copied from the internet! As a mostly copy paste developer, I copy things all the time! I never even thought I could copy something and what actually ended up on my clipboard would be something else! **See this site for details:** [https://briantracy.xyz/writing/copy-paste-shell.html](https://briantracy.xyz/writing/copy-paste-shell.html) **This is the tweet that lead to me learning about this:** [https://twitter.com/JGamblin/status/1317987698825625600?s=19](https://twitter.com/JGamblin/status/1317987698825625600?s=19) So basically, you can copy one thing and then end up pasting another! ## What to do? Well, @cinnamon-msft let me know Terminal already does this: ![warning](https://user-images.githubusercontent.com/18040091/96785147-3c779900-13a3-11eb-92e5-64b2d687cee5.png) So what if it also **showed** the contents of the clipboard so you could see what's really on the clipboard? Like this: ![warning2](https://user-images.githubusercontent.com/18040091/96785783-2c13ee00-13a4-11eb-87ff-dfdc40ffe0f0.png) That's it! That's the idea!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11103