hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 35225] - CookieSpecBase.domainMatch() leaks cookies to 3rd party domains
Date Mon, 06 Jun 2005 01:02:18 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35225>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35225





------- Additional Comments From gojomo@archive.org  2005-06-06 03:02 -------
The patch proposed in #3 leaves first endsWith() test in place, which still
allows leakage on cookies whose 'domain' value does not begin with a '.'. For
example:

CookieSpecBase cspec = new CookieSpecBase();
Cookie cookie = new
Cookie("sourceforge.net","foo","bar","/",Integer.MAX_VALUE,false);
cspec.match("antisourceforge.net",80,"/",false,cookie); // returns true

Changing that to equals then requires an endsWith test inside the "." case, as
in the suggestion in comment #1. (Which, as far as I can tell, then matches
Firefox cookie domain-matching behavior.)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org


Mime
View raw message