Live data from Hacker News

A proof-of-concept of a vulnerability in custom shell prompt scripts

github.com

51–54 of 54 posts

Re: A proof-of-concept of a vulnerability in custom shell prompt scripts

#52
TIL. Never expected bash would do an expansion on PS1 by default. Thanks a bunch.

bash-powerline is affected. I've sent out a PR: https://github.com/riobard/bash-powerline/pull/12/

My own fork (with some additional features) is already patched: https://github.com/Hexcles/bash-powerline

Re: A proof-of-concept of a vulnerability in custom shell prompt scripts

#54

Earlier quoted context omitted.

Zsh seems to do the escaping correctly there.

Confirming what GP said on version 5.3.1, not seeing any escaping git checkout git checkout $(./pwd)

Escaped here. How are you configuring your completion?

    -% zsh -f
    voi% echo $ZSH_VERSION
    5.3.1
    voi% autoload -U compinit
    voi% compinit
    voi% git checkout \$\(./pw3n\)
    Already on '$(./pw3n)'
    Your branch is up-to-date with 'origin/$(./pw3n)'.
    voi% git checkout complete_\$\(./foo\)
    Switched to branch 'complete_$(./foo)'
Post reply on HN