From 6695a0b36814e39dd882fee882784f4a4e702f2e Mon Sep 17 00:00:00 2001 From: Fabio <507164+falemagn@users.noreply.github.com> Date: Fri, 17 Nov 2023 20:00:20 +0100 Subject: [PATCH] In DoUserAuthRequestPassword() do not set ssh->clientState to CLIENT_USERAUTH_DONE if ret is not WS_SUCCESS. --- src/internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index f8849e867..775dbe517 100644 --- a/src/internal.c +++ b/src/internal.c @@ -5458,7 +5458,7 @@ static int DoUserAuthRequestPassword(WOLFSSH* ssh, WS_UserAuthData* authData, if (authFailure || partialSuccess) { ret = SendUserAuthFailure(ssh, partialSuccess); } - else { + else if (ret == WS_SUCCESS) { ssh->clientState = CLIENT_USERAUTH_DONE; }