diff options
author | Teddy Wing | 2016-11-14 01:56:15 -0500 |
---|---|---|
committer | Teddy Wing | 2016-11-14 01:56:15 -0500 |
commit | 5f24d24ab4054dbcaf47b40736604abdabb32d10 (patch) | |
tree | 182ad49ad84d3bb5ce5db6b3206f9068ff5730bc /README.md | |
parent | 8ca74dd4517a5c8e10238aea5cf1de7a36870240 (diff) | |
download | Passextract-5f24d24ab4054dbcaf47b40736604abdabb32d10.tar.bz2 |
Clear clipboard on quit
The last thing copied from Passextract will stick around in your
clipboard, potentially opening up your password to accidental pasting or
a clipboard exploit.
Pass deals with this in a nice way, by restoring your clipboard back to
what was copied before after a set time delay.
Here that same functionality is more difficult to achieve because the
Clipboard crate can only deal with strings. So if for example you've
copied a file, an image, a program's proprietary type, or some other
binary data, it can't be restored with the Clipboard crate. Pass is able
to do this because it uses the OS X `pbcopy`/`pbpaste` commands under
the hood, which do support binary data. We could do that here I suppose,
but it's easier and cross-platform to leverage a library.
My heavy-handed solution to the problem of clipboard insecurity is to
just overwrite the clipboard with an empty string when Passextract
quits. The solution is not ideal because it doesn't preserve your past
clipboard entry, and it forces you to keep the Passextract menu open
until you paste the copied entry, but it's better than nothing when it
comes to keeping the clipboard secure.
If there's an error writing to the clipboard, Passextract will refuse to
quit.
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions