]> granicus.if.org Git - curl/commitdiff
sasl: Fixed HTTP digest challenges with spaces between auth parameters
authorSteve Holme <steve_holme@hotmail.com>
Wed, 5 Nov 2014 17:56:47 +0000 (17:56 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Wed, 5 Nov 2014 17:58:07 +0000 (17:58 +0000)
Broken as part of the rework, in commit 7e6d51a73c, to assist with the
addition of HTTP digest via Windows SSPI.

lib/curl_sasl.c

index fd2585e3d619f66c001c0b1217b8b340797950f8..5ef7151da2da0949761a451a375eb86ca9fb6db0 100644 (file)
@@ -746,6 +746,10 @@ CURLcode Curl_sasl_decode_digest_http_message(const char *chlg,
     char value[DIGEST_MAX_VALUE_LENGTH];
     char content[DIGEST_MAX_CONTENT_LENGTH];
 
+    /* Pass all additional spaces here */
+    while(*chlg && ISSPACE(*chlg))
+      chlg++;
+
     /* Extract a value=content pair */
     if(!sasl_digest_get_pair(chlg, value, content, &chlg)) {
       if(Curl_raw_equal(value, "nonce")) {