From 6666f8c2361ffef969743aeeacba0c812b502eea Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Mon, 31 Mar 2003 19:27:44 +0000 Subject: [PATCH] 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 --- mozilla/extensions/cookie/nsCookies.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mozilla/extensions/cookie/nsCookies.cpp b/mozilla/extensions/cookie/nsCookies.cpp index 224b16a1048..078d91aa7bb 100644 --- a/mozilla/extensions/cookie/nsCookies.cpp +++ b/mozilla/extensions/cookie/nsCookies.cpp @@ -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