Bug 199928 cookies originating server test failes on ip addresses

patch by dwitte@stanford.edu r=mvl@exedo.nl sr=darin a=asa


git-svn-id: svn://10.0.0.236/trunk@140457 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
timeless%mozdev.org
2003-03-31 19:27:44 +00:00
parent 2d3415b2be
commit 6666f8c236

View File

@@ -892,11 +892,9 @@ cookie_IsForeign(nsIURI *aHostURI, nsIURI *aFirstURI) {
// first ensure we're not dealing with IP addresses; if we are, require an
// exact match. we can't avoid this, otherwise the algo below will allow two
// IP's such as 128.12.96.5 and 213.12.96.5 to match. if we decide this is
// unlikely or doesn't matter, this can be removed (which will remove the
// dependency on prnetdb.h -> codesize).
// IP's such as 128.12.96.5 and 213.12.96.5 to match.
if (cookie_IsIPAddress(firstHost)) {
return cookie_IsInDomain(firstHost, currentHost, PR_FALSE);
return !cookie_IsInDomain(firstHost, currentHost, PR_FALSE);
}
// next, allow a one-subdomain-level "fuzz" in the comparison. first, we need