[pass] Concurrency issue with --clip

Michael Ren micron33 at gmail.com
Mon Mar 10 05:00:04 CET 2014


Pass --clip spawns a subshell which sleeps for 45 seconds and then
restores the previous contents of the clipboard. If another instance of
pass --clip runs before the previous instance finishes sleeping, the
second instance will use the clipped password from the first instance as
the "old" clipboard contents, meaning that the first password will stay
in the clipboard after both instances are done.

This does not seem like desirable behavior, and I was wondering what
should be done to address it; as a workaround, I've modified pass to
echo empty text to the clipboard after sleep.

To test:

1. pass show -c password1
2. Wait no more than 45 seconds
3. pass show -c password2
4. wait 45 seconds
5. examine clipboard contents; the contents of password1 are in the
clipboard

Best,
Michael Ren

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 551 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20140310/0c2b6524/attachment.asc>


More information about the Password-Store mailing list