passage icon indicating copy to clipboard operation
passage copied to clipboard

Unecessary prompt for password

Open Myridium opened this issue 1 year ago • 1 comments

When editing a password, passage prompts for the password once to decrypt the file. But then it asks again when saving the file. It should not need to prompt the second time.

$ passage edit tmp
Enter passphrase for identity file "/home/username/.passage/identities":
Enter passphrase for identity file "/home/username/.passage/identities":
Password unchanged.

Myridium avatar Aug 07 '22 07:08 Myridium

The problem is that the existing file is decrypted (again) to check whether it has changed.

https://github.com/FiloSottile/passage/blob/1262d308f09db9b243513a428ab4b8fb1c30d31d/src/password-store.sh#L409-L416

Myridium avatar Aug 07 '22 09:08 Myridium

This is an intentional design choice of password-store, presumably to catch conflicts that happen during editing, which I don't think I am going to deviate from in passage.

FiloSottile avatar Dec 27 '22 12:12 FiloSottile