<div>
<div><span style="color: rgb(160, 160, 168); ">On Wednesday, February 6, 2013 at 5:06 PM, martin@v.loewis.de wrote:</span></div>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div><blockquote type="cite"><div><div>Javascript hosted on <a href="http://packages.python.org">packages.python.org</a> has access to cookies on </div><div><a href="http://python.org">python.org</a>, If <a href="http://python.org">python.org</a> has</div><div>any sort of login it's trivial to steal a session cookie.</div></div></blockquote><div><br></div><div>No, it doesn't. Cookies for "<a href="http://python.org">python.org</a>" are not available to </div><div>"<a href="http://packages.python.org">packages.python.org</a>".</div><div>It would have to be a cookie for ".<a href="http://python.org">python.org</a>". We don't issue such cookies.</div><div><br></div></div></div></span></blockquote><a href="http://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_cookies">http://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_cookies</a></div><div><br></div><div>Specifically:</div><div><br></div><div><i style="font-family: arial, sans-serif; text-align: left; ">Note: according to one of the specs, domain wildcards should be marked with a preceeding period, so <tt style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; font-size: 12px; max-width: 66em;">.example.com</tt> would denote a wildcard match for the entire domain - including, somewhat confusingly, <tt style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; font-size: 12px; max-width: 66em;">example.com</tt> proper - whereas <tt style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; font-size: 12px; max-width: 66em;">foo.example.com</tt> would denote an exact host match. Sadly, no browser follows this logic, and <tt style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; font-size: 12px; max-width: 66em;">domain=example.com</tt> is exactly equivalent to <tt style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; font-size: 12px; max-width: 66em;">domain=.example.com</tt>. There is no way to limit cookies to a single DNS name only, other than by not specifying <tt style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; font-size: 12px; max-width: 66em;">domain=</tt> value at all - and even this does not work in Microsoft Internet Explorer; likewise, there is no way to limit them to a specific port.</i></div><div><br></div><div><br><div><br>
</div>
</div>