mirror of
https://github.com/curl/curl.git
synced 2026-05-17 22:26:20 +03:00
Jan Sundin reported a case where curl ignored a cookie that browsers don't,
which turned up to be due to the number of dots in the 'domain'. I've now made curl follow the the original netscape cookie spec less strict on that part.
This commit is contained in:
parent
fdda786fa2
commit
98ee12bc35
1 changed files with 7 additions and 1 deletions
|
|
@ -234,7 +234,13 @@ Curl_cookie_add(struct CookieInfo *c,
|
|||
break;
|
||||
}
|
||||
}
|
||||
if(dotcount < 3) {
|
||||
/* The original Netscape cookie spec defined that this domain name
|
||||
MUST have three dots (or two if one of the seven holy TLDs),
|
||||
but it seems that these kinds of cookies are in use "out there"
|
||||
so we cannot be that strict. I've therefore lowered the check
|
||||
to not allow less than two dots. */
|
||||
|
||||
if(dotcount < 2) {
|
||||
/* Received and skipped a cookie with a domain using too few
|
||||
dots. */
|
||||
badcookie=TRUE; /* mark this as a bad cookie */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue