News for hackers. Stuff that matters.
Re:Don't Copy-Paste from Website to Terminal by jakub_g on Sunday April 07, 2013 @05:21PM (#5508820)
It's still possible to circumvent this by creating a one-liner using semicolons. Just grab a code like [2] and append `; rm -rf` to the selection. If the original selection was a one-liner, it'll still be.

[2] http://stackoverflow.com/a/4777746/

Re:Don't Copy-Paste from Website to Terminal by joliss on Sunday April 07, 2013 @05:55PM (#5508932)
My idea was that if you're pasting a single line, then at least you can review the command you pasted before hitting enter.
Re:Don't Copy-Paste from Website to Terminal by jakub_g on Monday April 08, 2013 @02:59PM (#5513721)
I've just realized that you meant the fact that multiline pastes are often immediately executed, right?

I've tried various ways of input to my console (MINGW/WinXP) for multiline pastes, and the results are as follows: 1. Right-click multiline paste: unsafe (executes immediately) 2. Windows paste (alt-space, e, p): unsafe (executes immediately) 3. Insert or Shift-Insert: safe (pastes only the first line)