Remove incomplete special_domain tests
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=385702
This commit is contained in:
17
cookie.c
17
cookie.c
@@ -254,10 +254,6 @@ find_cookie(ParsedURL *pu)
|
|||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *special_domain[] = {
|
|
||||||
".com", ".edu", ".gov", ".mil", ".net", ".org", ".int", NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
int
|
int
|
||||||
check_avoid_wrong_number_of_dots_domain( Str domain )
|
check_avoid_wrong_number_of_dots_domain( Str domain )
|
||||||
{
|
{
|
||||||
@@ -333,19 +329,6 @@ add_cookie(ParsedURL *pu, Str name, Str value,
|
|||||||
COOKIE_ERROR(COO_ESPECIAL);
|
COOKIE_ERROR(COO_ESPECIAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (n == 2) {
|
|
||||||
char **sdomain;
|
|
||||||
int ok = 0;
|
|
||||||
for (sdomain = special_domain; !ok && *sdomain; sdomain++) {
|
|
||||||
int offset = domain->length - strlen(*sdomain);
|
|
||||||
if (offset >= 0 &&
|
|
||||||
strcasecmp(*sdomain, &domain->ptr[offset]) == 0)
|
|
||||||
ok = 1;
|
|
||||||
}
|
|
||||||
if (!ok && ! check_avoid_wrong_number_of_dots_domain(domain)) {
|
|
||||||
COOKIE_ERROR(COO_ESPECIAL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* [DRAFT 12] s. 4.3.2 case 2 */
|
/* [DRAFT 12] s. 4.3.2 case 2 */
|
||||||
|
Reference in New Issue
Block a user