[PATCH] Unused file .gpg at password-store path: bug
Marcelo Akira
marcelo.akira at gmail.com
Wed Sep 12 03:45:42 CEST 2018
Hi,
I accidentally created an unused file .gpg at password-store path and since
command 'pass list' not worked anymore.
You can reproduce this bug with this commands:
$ pass generate ''
The generated password for is:
hE+>?(yHpYah2EIH\D2,j=z&t
$ ls -la ~/.password-store/.gpg
-rw------- 1 akira akira 348 set 11 22:32 /home/akira/.password-store/.gpg
$ pass list
hE+>?(yHpYah2EIH\D2,j=z&t
To prevent this, pass could ignore the file (~/.password-store/.gpg):
diff --git a/src/password-store.sh b/src/password-store.sh
index d89d455..3fac380 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -363,7 +363,7 @@ cmd_show() {
local path="$1"
local passfile="$PREFIX/$path.gpg"
check_sneaky_paths "$path"
- if [[ -f $passfile ]]; then
+ if [[ -f $passfile ]] && ! [[ -z $path ]]; then
if [[ $clip -eq 0 && $qrcode -eq 0 ]]; then
pass="$($GPG -d "${GPG_OPTS[@]}" "$passfile" |
$BASE64)" || exit $?
echo "$pass" | $BASE64 -d
Thanks,
--
Marcelo Akira Inuzuka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20180911/1284b73f/attachment.html>
More information about the Password-Store
mailing list