-
-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trailing whitespace removed when copying password to clipboard #2873
Comments
Correct. We currently do not support passwords with leading or trailing whitespaces: https://github.com/gopasspw/gopass/blob/master/pkg/gopass/secrets/akv.go#L253 |
Since key-value pairs are only |
@lhardt That does sound like it shouldn't break any existing workflows that we'd want to support. If you do so please only remove the first character if it's a whitespace. I haven't recently looked at the KV implementation, but we might still support |
Signed-off-by: Leo Hardt <leom.hardt@gmail.com>
Done :) See PR #2954 |
* [ENHANCEMENT] Allow for whitespace-trailing passwords (#2873) Signed-off-by: Leo Hardt <leom.hardt@gmail.com> * [ENHANCEMENT] Allow for whitespace-trailing passwords pt2 Signed-off-by: Leo Hardt <leom.hardt@gmail.com> --------- Signed-off-by: Leo Hardt <leom.hardt@gmail.com>
Should be fixed by #2954. |
Great to see this in! |
Summary
Hi there. I just found that whenever a secret has a trailing whitespace, copying as
gopass show -c test_secret
doesn't copy the whitespace. Showing the secret without copying prints the secret correctly. Also, intermediate whitespaces work fine.Is this known / intentional? Perhaps having a trailing whitespace is not an expected use case.
Steps To Reproduce
Create a new secret with a trailing whitespace (e.g.,
supersecure
). Try copying withgopass show -c test_secret
.Expected behavior
supersecure
ends up on the clipboard.Environment
Manjaro Linux
Linux 5.10.211-1-MANJARO #1 SMP PREEMPT Fri Mar 1 16:55:20 UTC 2024 x86_64 GNU/Linux
gopass 1.15.11 go1.21.4 linux amd64
yay
The text was updated successfully, but these errors were encountered: