gopass icon indicating copy to clipboard operation
gopass copied to clipboard

Trailing whitespace removed when copying password to clipboard

Open leandrolanzieri opened this issue 4 months ago • 1 comments

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

leandrolanzieri avatar Apr 26 '24 07:04 leandrolanzieri