mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
A bug report on the curl-library list showed a HTTP Digest session going on
with a 700+ letter nonce. Previously libcurl only support 127 letter ones and now I bumped it to 1023.
This commit is contained in:
parent
f75ba55b51
commit
45a2240ead
@ -90,19 +90,19 @@ CURLdigest Curl_input_digest(struct connectdata *conn,
|
|||||||
Curl_digest_cleanup_one(d);
|
Curl_digest_cleanup_one(d);
|
||||||
|
|
||||||
while(more) {
|
while(more) {
|
||||||
char value[32];
|
char value[256];
|
||||||
char content[128];
|
char content[1024];
|
||||||
size_t totlen=0;
|
size_t totlen=0;
|
||||||
|
|
||||||
while(*header && ISSPACE(*header))
|
while(*header && ISSPACE(*header))
|
||||||
header++;
|
header++;
|
||||||
|
|
||||||
/* how big can these strings be? */
|
/* how big can these strings be? */
|
||||||
if((2 == sscanf(header, "%31[^=]=\"%127[^\"]\"",
|
if((2 == sscanf(header, "%255[^=]=\"%1023[^\"]\"",
|
||||||
value, content)) ||
|
value, content)) ||
|
||||||
/* try the same scan but without quotes around the content but don't
|
/* try the same scan but without quotes around the content but don't
|
||||||
include the possibly trailing comma, newline or carriage return */
|
include the possibly trailing comma, newline or carriage return */
|
||||||
(2 == sscanf(header, "%31[^=]=%127[^\r\n,]",
|
(2 == sscanf(header, "%255[^=]=%1023[^\r\n,]",
|
||||||
value, content)) ) {
|
value, content)) ) {
|
||||||
if(strequal(value, "nonce")) {
|
if(strequal(value, "nonce")) {
|
||||||
d->nonce = strdup(content);
|
d->nonce = strdup(content);
|
||||||
|
Loading…
Reference in New Issue
Block a user