-
Notifications
You must be signed in to change notification settings - Fork 10
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
"Unexpected response: OK" if empty password is entred via pinentry #176
Comments
Thanks for opening an issue. It's easy to reproduce. Response when we enter something:
Response when we enter nothing:
We were always under the impression that there would be a |
d-e-s-o
added a commit
that referenced
this issue
May 2, 2021
As it turns out, the pinentry program responds slightly differently to a request to enter a password/PIN when the user enters one vs. when he/she just continues, leaving the input empty, as is illustrated here: When the user enters 'hello': > $ gpg-connect-agent 'GET_PASSPHRASE --data cacheid errormsg prompt description' '/bye' > D hello > OK When the user enters nothing: > $ gpg-connect-agent 'GET_PASSPHRASE --data cacheid errormsg prompt description' '/bye' > OK So far we always expected a two line response, with the first line containing the 'D ' prefix, which prevents us from handling empty input properly. This change fixes this shortcoming by adding a case for it. Fixes #176
d-e-s-o
added a commit
that referenced
this issue
May 2, 2021
As it turns out, the pinentry program responds slightly differently to a request to enter a password/PIN when the user enters one vs. when he/she just continues, leaving the input empty, as is illustrated here: When the user enters 'hello': > $ gpg-connect-agent 'GET_PASSPHRASE --data cacheid errormsg prompt description' '/bye' > D hello > OK When the user enters nothing: > $ gpg-connect-agent 'GET_PASSPHRASE --data cacheid errormsg prompt description' '/bye' > OK So far we always expected a two line response, with the first line containing the 'D ' prefix, which prevents us from handling empty input properly. This change fixes this shortcoming by adding a case for it. Fixes #176
d-e-s-o
added a commit
that referenced
this issue
May 9, 2021
As it turns out, the pinentry program responds slightly differently to a request to enter a password/PIN when the user enters one vs. when he/she just continues, leaving the input empty, as is illustrated here: When the user enters 'hello': > $ gpg-connect-agent 'GET_PASSPHRASE --data cacheid errormsg prompt description' '/bye' > D hello > OK When the user enters nothing: > $ gpg-connect-agent 'GET_PASSPHRASE --data cacheid errormsg prompt description' '/bye' > OK So far we always expected a two line response, with the first line containing the 'D ' prefix, which prevents us from handling empty input properly. This change fixes this shortcoming by adding a case for it. Fixes #176
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
During investigation of issue #175 I found that nitrocli-0.4.0 fails to recognize pinentry's response when empty password is provided and OK button is pressed (or just hit the Enter):
If cancel is pressed (or Esc) response is more reasonable:
Why I need to enter empty password in the first place? Due to bug #175 the first entered password will be discarded regardless of whether it is valid or not, so to save time I tried just to skip it by pressing Enter and found another issue.
The text was updated successfully, but these errors were encountered: