Hi,
this way you allow to pass generate a .gpg file that pass will never be
able to read again.
Instead of fixing the symptom I suggest to fix the cause: Change
generate to not create .gpg files without a basename.
Cheers,
Lars
On 12.09.2018 03:45, Marcelo Akira wrote:
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
_______________________________________________
Password-Store mailing list
[email protected]
https://lists.zx2c4.com/mailman/listinfo/password-store
_______________________________________________
Password-Store mailing list
[email protected]
https://lists.zx2c4.com/mailman/listinfo/password-store