[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [oss-security] Re: Terminal Control Chars

On Thu, 12 Apr 2018 at 17:18:45 -0400, David A. Wheeler wrote:
> Russ Allbery:
> > I think a useful definition of "control character" in this context (and I
> > realize this doesn't exactly match the ASCII definition) is a character
> > that results in an action other than insertion being taken...
> > CR and LF would not be control characters in that definition
> As you noted, that definition doesn't match the ASCII definition, but
> I also think it's misleading.  If someone pastes a CR/LF into a shell prompt,
> it certainly *DOES* cause an action, namely, execution of that line.

I hope you're not proposing that, to protect users of terminal emulators,
general-purpose web browsers should not allow copying more than a
paragraph at a time? That seems like a change that is unlikely to be

Similarly, if filtering of pastes is done at the destination side (the
terminal emulator), it would seem bad to be unable to paste more than
a line at a time into a text editor that happens to be running in a
terminal emulator (for instance the one in which I'm writing this email).

Russ's more loose definition of "control character" (in particular,
preventing copying and/or pasting ESC and the 0x80-0x9F range) would be
enough to protect users of a terminal/shell combination that supports
bracketed paste, as far as I'm aware?