aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2019-05-18 17:17:12 +0100
committerSteve Holme <steve_holme@hotmail.com>2019-05-18 19:01:10 +0100
commit2697d633630477de3b0d9ead2dea599f3b79af75 (patch)
treeacbafbe7d09b5ebac9f3a59fe5006a7e61380028
parentbd21fc9d2f266e801f3846cf0dd7e9f183358a43 (diff)
http_ntlm_wb: Cleanup handshake after clean NTLM failure
Missed in 50b87c4e.
-rw-r--r--lib/curl_ntlm_wb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/curl_ntlm_wb.c b/lib/curl_ntlm_wb.c
index 2aa2289b2..fa0ad95fb 100644
--- a/lib/curl_ntlm_wb.c
+++ b/lib/curl_ntlm_wb.c
@@ -356,7 +356,13 @@ CURLcode Curl_input_ntlm_wb(struct connectdata *conn,
*state = NTLMSTATE_TYPE2; /* We got a type-2 message */
}
else {
- if(*state >= NTLMSTATE_TYPE1) {
+ if(*state == NTLMSTATE_TYPE3) {
+ infof(conn->data, "NTLM handshake rejected\n");
+ Curl_http_auth_cleanup_ntlm_wb(conn);
+ *state = NTLMSTATE_NONE;
+ return CURLE_REMOTE_ACCESS_DENIED;
+ }
+ else if(*state >= NTLMSTATE_TYPE1) {
infof(conn->data, "NTLM handshake failure (internal error)\n");
return CURLE_REMOTE_ACCESS_DENIED;
}