diff options
author | Urbain Vaes <urbain@vaes.uk> | 2018-01-31 10:50:01 +0000 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2018-01-31 10:50:01 +0000 |
commit | 0a0acf361b779ac7346e2bd5ac7156b42d376166 (patch) | |
tree | 3368a3067db4a0a195792be67999f8a6cbf07643 /qutebrowser/.local/share | |
parent | 12ad5da5c57fb08048bde28444d9253d3f80b3c1 (diff) |
[qutebrowser] Fix escaping bug in user-pass script
Diffstat (limited to 'qutebrowser/.local/share')
-rwxr-xr-x | qutebrowser/.local/share/qutebrowser/userscripts/user-password | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/qutebrowser/.local/share/qutebrowser/userscripts/user-password b/qutebrowser/.local/share/qutebrowser/userscripts/user-password index 33ca7b5..c2db041 100755 --- a/qutebrowser/.local/share/qutebrowser/userscripts/user-password +++ b/qutebrowser/.local/share/qutebrowser/userscripts/user-password @@ -1,7 +1,10 @@ #!/usr/bin/env bash target=$(find $HOME/.password-store/ -name "*.gpg" -printf "%P\n" | dmenu -i -p "Get identifier for:") -echo "fake-key '<Esc>'" >> $QUTE_FIFO -echo "fake-key '$(basename $target .gpg)'" >> $QUTE_FIFO -echo "fake-key '<Tab>'" >> $QUTE_FIFO -echo "fake-key '$(pass show ${target%.gpg})'" >> $QUTE_FIFO +username=$(basename $target .gpg | sed 's/\\/\\\\/g; s/"/\\"/g') +password=$(pass show ${target%.gpg} | sed 's/\\/\\\\/g; s/"/\\"/g') +echo "fake-key '<Esc>'" >> $QUTE_FIFO +echo "fake-key \"$username\"" >> $QUTE_FIFO +echo "fake-key '<Tab>'" >> $QUTE_FIFO +echo "fake-key \"$password\"" >> $QUTE_FIFO +echo "fake-key \"$password\"" > ~/.test |