They're all about security issues in terminal emulators, or cat, not bash.
They don't require bash at all.
I totally agree that this is not a vulnerability in bash (or cat), but
bash, as opposed to cat, has no requirement to faithfully pass every
conceivable escape sequence on to the terminal from $PS1.
I'd say there's a user expectation for that. That's why the \[ and \]
escapes exist.
The shell
even keeps the PS1 variable's value from its inherited environment
without sanitizing it.
Why would people want bash to second-guess them like that?
I will look at doing something here to improve the situation, but I'll push
back on the notion that this is a security issue with bash.
Sure. Bash is just the vector, a carrier of potentially problematic
data. Data that is part of the prompt.
Displaying the prompt should not be dangerous.
And by the same token, `pwd' and `cd' should not be dangerous, right? As
I said in my previous message, there is a legitimate reason to make the
output of the \w and \W escapes visible: not doing so throws off readline's
redisplay. But let's not take this into the ridiculous.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/