]> granicus.if.org Git - curl/commitdiff
Jose Kahan pointed out a Digest server that provided the algorith last in the
authorDaniel Stenberg <daniel@haxx.se>
Mon, 26 Feb 2007 22:03:01 +0000 (22:03 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 26 Feb 2007 22:03:01 +0000 (22:03 +0000)
header line without quotes and with a CRLF immediately following...

lib/http_digest.c

index c223784f9124fd9fc4b5779861d34acdff5e4b5a..604655f040153cf5cb281916a5641c2f514d9b01 100644 (file)
@@ -101,8 +101,8 @@ CURLdigest Curl_input_digest(struct connectdata *conn,
       if((2 == sscanf(header, "%31[^=]=\"%127[^\"]\"",
                       value, content)) ||
          /* try the same scan but without quotes around the content but don't
-            include the possibly trailing comma */
-         (2 ==  sscanf(header, "%31[^=]=%127[^,]",
+            include the possibly trailing comma, newline or carriage return */
+         (2 ==  sscanf(header, "%31[^=]=%127[^\r\n,]",
                        value, content)) ) {
         if(strequal(value, "nonce")) {
           d->nonce = strdup(content);