Skip to content

Trailing whitespace removed when copying password to clipboard #2873

@leandrolanzieri

Description

@leandrolanzieri

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions