mirror of
https://github.com/curl/curl.git
synced 2024-11-21 01:16:58 +08:00
Joel Chen reported that we assumed content within quotes a bit too much in
the digest code. This fixes it.
This commit is contained in:
parent
0cfa9b52ae
commit
81c48aa43d
@ -66,7 +66,7 @@ CURLdigest Curl_input_digest(struct connectdata *conn,
|
|||||||
struct SessionHandle *data=conn->data;
|
struct SessionHandle *data=conn->data;
|
||||||
bool before = FALSE; /* got a nonce before */
|
bool before = FALSE; /* got a nonce before */
|
||||||
struct digestdata *d;
|
struct digestdata *d;
|
||||||
|
|
||||||
if(proxy) {
|
if(proxy) {
|
||||||
d = &data->state.proxydigest;
|
d = &data->state.proxydigest;
|
||||||
}
|
}
|
||||||
@ -168,7 +168,12 @@ CURLdigest Curl_input_digest(struct connectdata *conn,
|
|||||||
else {
|
else {
|
||||||
/* unknown specifier, ignore it! */
|
/* unknown specifier, ignore it! */
|
||||||
}
|
}
|
||||||
totlen = strlen(value)+strlen(content)+3;
|
totlen = strlen(value)+strlen(content)+1;
|
||||||
|
|
||||||
|
if(header[strlen(value)+1] == '\"')
|
||||||
|
/* the contents were within quotes, then add 2 for them to the
|
||||||
|
length */
|
||||||
|
totlen += 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
break; /* we're done here */
|
break; /* we're done here */
|
||||||
|
Loading…
Reference in New Issue
Block a user