Closed ckolumbus closed 4 years ago
As addition: i can provide a PR but wanted to discuss the proper/expected behavior before implementing anything.
Options from the top of my head:
other ideas? Feedback?
I think I'd like option #3 the most. This would give the greates isolation from potentially breaking changes in the gopass cli interface (expect some more). The new API - while still not fully finished - should allow a good integration point.
Option #2 would be OK, but eventually I'd like to reduce special cases in the main gopass binary, so this would be only a temporary measure.
The problem with option #1 is that it also affects all others users and use-cases and the list of (mostly undocumented) features and interactions between the different switches is already super confusing. So I'll accept changes to that only if it comes with a well written feature / flag matrix documentation.
Option 3 it is :+1: Thanks for the quick feedback
one more question: gopass show
has a parameter
--password, -o Display only the password (default: false)
executing gopass show -o misc/test
yields the expected output
GxAicJQrGAA534Lo5wi5eByZ
but performing a search with gopass show -o test
provides the full secret output.
Entry 'test' not found. Starting search...
Found exact match in 'misc/test'
GxAicJQrGAA534Lo5wi5eByZ
foo: bar
is this the expected behavior for show -o
?
@dominikschulz can you have a quick look at the implementation in the PR #1438 whether it's going into the right direction? I also have some problems with identifying how to unit test this (i.e. setting the Args
parameter for the action context). Some advice on where to look for good examples would be appreciated.
I looked at the show_test.go but I'm not sure whether the whole action implementation is adequate for the simple show functionality within summon-provider.go
I modeled the implementation according to git-credential.go
, but the test there assumestdin
input andno args.
Sorry, I'm not a go master.
gopass show -o
: These should yield the same results, but likely the plumbing through of the -o
flag to the search fallback is broken. This should be fixed.
Thanks for that PR, I left some comments.
In my understanding since #1438 has been merged, this ticket can be closed :-)
Yes, indeed. Thanks!
Summary
using gopass (1.9.2) as as summon provider (via linking the gopass executable into the summon provider directory) gopass outputs the whole secret content when queried instead of only the secret, as required by the protocol
Steps To Reproduce
Expected behavior
expected output: one line with the secret
Environment
pacman -S gopass
)