aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-11-06 15:25:45 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-11-06 15:27:27 +0000
commitcfe4252744803d6fc2f7dcea7d168d2b9cceac14 (patch)
treea84e1c2e92d9d9607551361de401d067dbc27e3d
parent500d2db302bea1544e9750b44cd1531a1a50d8fe (diff)
http_digest: Fixed auth retry loop when SSPI based authentication fails
-rw-r--r--lib/curl_sasl_sspi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/curl_sasl_sspi.c b/lib/curl_sasl_sspi.c
index 45aca8ac4..527aa66ef 100644
--- a/lib/curl_sasl_sspi.c
+++ b/lib/curl_sasl_sspi.c
@@ -291,8 +291,10 @@ CURLcode Curl_sasl_decode_digest_http_message(const char *chlg,
{
size_t chlglen = strlen(chlg);
- /* Clean up any former leftovers and initialise to defaults */
- Curl_sasl_digest_cleanup(digest);
+ /* We had an input token before and we got another one now. This means we
+ provided bad credentials in the previous request. */
+ if(digest->input_token)
+ return CURLE_BAD_CONTENT_ENCODING;
/* Simply store the challenge for use later */
digest->input_token = (BYTE *) Curl_memdup(chlg, chlglen);