<pre>echo 'normal code, nothing to see here :)'<span style="color:transparent;font-size:0">; echo 'evil stuff'</span>
echo 'nothing suspicious at all :)'</pre>
Yes indeed they do not read it at all. Even if you tell them right before the to be copied text to replace the obvious placeholders with the real value needed. And then they complain on slack that 'this thing in the docs doesn't work. Help!'.
Always have them show you exactly what they did. No descriptions of what they did, let them show you. Yes, do ask the obvious 'did you replace the placeholders?' question.
> Not only do you get a completely different command present on your clipboard, but to make matters worse, it has a newline (or return) character at the end of it.
> This means the above example would execute as soon as it's pasted directly into a Linux terminal.
You can mostly avoid this problem with a little configuration if bracketed-paste-mode isn't default on whatever you're using.
Make sure it's supported and/or active on your terminal (e.g. urxvt, xterm) and the CLI/TUI programs (e.g. vim, bash/libreadline) on which you want to paste.
At the link above is a link to an SE answer I wrote years ago:
Jus another reminder that the modern browser is an awful platform with basically no unique purpose but user exploitation - which is why it happens to be ubiquitous.
11 comments
[ 3.5 ms ] story [ 41.0 ms ] threadLike do they just smash ctrl+v//enter super fast? Why would anyone do that
Always have them show you exactly what they did. No descriptions of what they did, let them show you. Yes, do ask the obvious 'did you replace the placeholders?' question.
Very common answer: 'What placeholders?'
> Not only do you get a completely different command present on your clipboard, but to make matters worse, it has a newline (or return) character at the end of it.
> This means the above example would execute as soon as it's pasted directly into a Linux terminal.
https://news.ycombinator.com/item?id=24797720
You can mostly avoid this problem with a little configuration if bracketed-paste-mode isn't default on whatever you're using.
Make sure it's supported and/or active on your terminal (e.g. urxvt, xterm) and the CLI/TUI programs (e.g. vim, bash/libreadline) on which you want to paste.
At the link above is a link to an SE answer I wrote years ago:
https://security.stackexchange.com/questions/39118/how-can-i...
It has a table showing what terminals support bracketed paste mode, and also provides a urxvt plugin to fix a bug in urxvt's implementation.
[1] - https://thejh.net/misc/website-terminal-copy-paste
[2] - https://news.ycombinator.com/item?id=5508225
https://daringfireball.net/2010/05/tynt_copy_paste_jerks