aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-08-04 12:26:27 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-08-04 12:26:27 +0000
commitde6ab3de22affd84eddd5ace857efb34a57aafc0 (patch)
tree46b0a52d4fdf8dba9f85953d6de5cc3aacf9f789 /lib
parent5e1eb58e5a9f98500700c9069d316a5f8b4a60ee (diff)
Dylan Salisbury's fix to prevent us from accepting cookies from TLD only
Diffstat (limited to 'lib')
-rw-r--r--lib/cookie.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index da7ca1ba7..fe603c672 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -223,14 +223,9 @@ Curl_cookie_add(struct SessionHandle *data,
const char *domptr=whatptr;
int dotcount=1;
- unsigned int i;
- static const char *seventhree[]= {
- "com", "edu", "net", "org", "gov", "mil", "int"
- };
-
- /* Count the dots, we need to make sure that there are THREE dots
- in the normal domains, or TWO in the seventhree-domains. */
+ /* Count the dots, we need to make sure that there are enough
+ of them. */
if('.' == whatptr[0])
/* don't count the initial dot, assume it */
@@ -244,13 +239,6 @@ Curl_cookie_add(struct SessionHandle *data,
}
} while(domptr);
- for(i=0;
- i<sizeof(seventhree)/sizeof(seventhree[0]); i++) {
- if(tailmatch(seventhree[i], whatptr)) {
- dotcount++; /* we allow one dot less for these */
- break;
- }
- }
/* 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"