You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After adding multiline password (also when it is only one line) the first line is empty and there I am not able to copy password via gopass command. I have to edit it firstly and manually remove first empty line. Then it is working as expected.
Steps To Reproduce
$ gopass insert -m personal/test
# vim opens
pass1
# :wq to save and quit
$ gopass personal/test
Secret: personal/test
pass1
$ gopass -c personal/test
Error: empty secret. see https://go.gopass.pw/faq#empty-secret
Expected behavior
$ gopass personal/test
Secret: personal/test
pass1
$ gopass -c personal/test
✔ Copied personal/test to clipboard. Will clear in 45 seconds.
This commit fixes as small issue in how multi-line secrets are handled.
Before they were always written in to the secret body completly ignoring
the first line that contains the password. Now we do respect that
correctly. To implement that properly we need to have some additional
code to satisfy the io.Writer assumptions around the AKV secret type.
Also this fixes some non-hermetic tests that showed up during testing of
this change.
Fixesgopasspw#2614
Signed-off-by: Dominik Schulz <[email protected]>
* Correctly handle new multiline secrets
This commit fixes as small issue in how multi-line secrets are handled.
Before they were always written in to the secret body completly ignoring
the first line that contains the password. Now we do respect that
correctly. To implement that properly we need to have some additional
code to satisfy the io.Writer assumptions around the AKV secret type.
Also this fixes some non-hermetic tests that showed up during testing of
this change.
Fixes#2614
Signed-off-by: Dominik Schulz <[email protected]>
* Fix typo
Signed-off-by: Dominik Schulz <[email protected]>
* Ditch the MultiWriter approach in favor of a pass-through writer
Signed-off-by: Dominik Schulz <[email protected]>
* Format
Signed-off-by: Dominik Schulz <[email protected]>
---------
Signed-off-by: Dominik Schulz <[email protected]>
Summary
After adding multiline password (also when it is only one line) the first line is empty and there I am not able to copy password via gopass command. I have to edit it firstly and manually remove first empty line. Then it is working as expected.
Steps To Reproduce
Expected behavior
Environment
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
$ uname -a
Linux mcuper-P14s 5.19.0-46-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 21 15:35:31 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ gopass version
gopass 1.15.5 go1.20.2 linux amd64
$go install github.com/gopasspw/gopass@latest
The text was updated successfully, but these errors were encountered: