Skip to content
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

Open
leandrolanzieri opened this issue Apr 26, 2024 · 1 comment
Open

Comments

@leandrolanzieri
Copy link

leandrolanzieri commented Apr 26, 2024

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 with gopass show -c test_secret.

Expected behavior

supersecure ends up on the clipboard.

Environment

  • OS: Manjaro Linux
  • OS version: Linux 5.10.211-1-MANJARO #1 SMP PREEMPT Fri Mar 1 16:55:20 UTC 2024 x86_64 GNU/Linux
  • gopass Version: gopass 1.15.11 go1.21.4 linux amd64
  • Installation method: yay
@dominikschulz
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants