mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:23:39 +03:00
digest: pass over leading spaces in qop values
When parsing the "qop=" parameter of the digest authentication, and the value is provided within quotes, the list of values can have leading white space which the parser previously did not handle correctly. Add test case 388 to verify. Reported-by: vlubart on github Fixes #9264 Closes #9270
This commit is contained in:
parent
3fe24ea322
commit
0ad7c8d7d5
3 changed files with 160 additions and 1 deletions
|
|
@ -560,6 +560,9 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg,
|
|||
|
||||
token = strtok_r(tmp, ",", &tok_buf);
|
||||
while(token) {
|
||||
/* Pass additional spaces here */
|
||||
while(*token && ISSPACE(*token))
|
||||
token++;
|
||||
if(strcasecompare(token, DIGEST_QOP_VALUE_STRING_AUTH)) {
|
||||
foundAuth = TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue