Skip to content

Commit

Permalink
support otp prompts starting with 'Enter'
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbaseman committed Mar 8, 2019
1 parent c46cc36 commit f3b820e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,11 @@ int try_otp_auth(
return -1;
strncpy(path, s, e - s);
path[e - s] = '\0';
/* Try to get password prompt, asume it starts with 'Please'
/* Try to get password prompt, asume it starts with 'Please' or 'Enter'
* Fall back to default prompt if not found/parseable
*/
p = strstr(s, "Please");
if (p == NULL) p = strstr(s, "Enter");

This comment has been minimized.

Copy link
@DimitriPapadopoulos

DimitriPapadopoulos Mar 10, 2019

Collaborator

Line break between if and statement:

        if (p == NULL)
            p = strstr(s, "Enter");

This comment has been minimized.

Copy link
@mrbaseman

mrbaseman Mar 11, 2019

Author Collaborator

I have removed this anyway, because in #427 I have learned that the output has been translated for the github issue, so it is unlikely that this string ever matches. Also, with --otp-prompt a more flexible solution is available.

if (p) {
e = strchr(p, '<');
if (e != NULL) {
Expand Down

0 comments on commit f3b820e

Please sign in to comment.