-
-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OTP incompatibility with the new AKV parser #2462
Comments
The documented format should still work and it did definitely work in our test cases. Not sure what's wrong here. |
Thanks for your answer. I tried with your last commit and it works now. After digging, it seems related to the line added here: Without this line, the Body parsed in the
So it fails the check https://github.com/gopasspw/gopass/blob/master/pkg/otp/otp.go#L26 With this line the body is:
So now the OTP line is properly parsed and gopass generates the OTP as expected! I close this issue as I consider it fixed 😄 |
Amazing. Thank you. I guess the reason why this didn't show up in testing was that I only tested with entries that only had the otpauth entry in the body and nothing else. Also the 1.15.0 release was missing some test coverage. I'm glad we fixed that already. Will make sure to have a new patch release out very soon. |
Let me reopen this. I want to add some test-cases for this case. |
RELEASE_NOTES=n/a Fixes gopasspw#2462 Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
RELEASE_NOTES=n/a Fixes #2462 Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org> Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Sure is good that I have an old version in my nix store or I'd be extremely screwed right now. Thanks for the fast report and fix. |
This should be fixed in 1.15.1. |
Summary
Since gopass 1.5, the
gopass otp XXX
command returns :I investigated this issue and it seems related to the new parser introduced in 1e7a6b1.
Indeed, the separator is hardcoded to
:
(see https://github.com/gopasspw/gopass/blob/master/pkg/gopass/secrets/akv.go#L13)While my OTP lines has the form:
I tried:
:
both modifications allowed gopass to properly generate the OTP code
The documentation specifies using
otpauth://
(https://github.com/gopasspw/gopass/blob/d00c29a0e8e521eb32e4564998690430dcc7dbbc/docs/commands/otp.md), so I'm not sure if I should update the new format given that it breaks compatibility with other applications such as https://github.com/android-password-store/Android-Password-Store.Steps To Reproduce
Run
gopass otp XXXX
with the XXX file having the following otp format:Gopass returns the error:
Expected behavior
Gopass properly generates the OTP code
Environment
Additional context
The text was updated successfully, but these errors were encountered: