Skip to content

show.autoclip with show.safecontent results in empy clip #3034

@letfadude

Description

@letfadude

Summary

when calling gopass show -c [key] with safecontent=true results in password copied to clipboard and not showing in stdout
if configured with autoclip && safecontent and calling gopass show [key] results in empty string in clipboard and no stdout
only without setting safecontent autoclip will work correctly but password is shown in stdout

Steps To Reproduce

# with autoclip and safecontent true

$ gopass show [key]
Secret: [key]

url: [url]
username: [username]

$ xsel -b -o
\ No newline at end of selection

# with safecontent = false and autoclip = true

$ gopass show key
✔ Copied key to clipboard. Will clear in 45 seconds.
Secret: key

[secret]
url: [url]
username: [username]

$ xsel -b -o
[secret]
\ No newline at end of selection

Expected behavior

autoclip and safecontent true should result in password saved to clipboard and not displayed in stdout

Environment

  • OS: Linux Mint 21.3 (Virginia)
  • OS version: Linux fadude-tp 5.15.0-130-generic Fix git invocation #140-Ubuntu SMP Wed Dec 18 17:59:53 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
  • gopass Version: gopass 1.15.15 go1.23.3 linux amd64
  • Installation method: Debian Repo according to documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugDefects

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions