Re:Don't Copy-Paste from Website to Terminal
by eropple on Sunday April 07, 2013 @04:19PM
(#5508570)
This isn't a solution--this is exactly the dangerous behavior that this webpage is trying to convince you not to do.
Because they can put a newline in the malicious paste.
Re:Don't Copy-Paste from Website to Terminal
by Bootvis on Sunday April 07, 2013 @04:17PM
(#5508561)
If the text contains a newline the command[1] will be executed immediately so that won't protect you.
[1]: At least, in the terminals I regularly use.
Re:Don't Copy-Paste from Website to Terminal
by koenigdavidmj on Sunday April 07, 2013 @04:24PM
(#5508588)
There was a newline hidden in the one pasted here, so that's not an option. It would have run something no matter what.
Not only is this a good habit as far as security goes, it's also the best way I can think of to learn from problems.