<div class="gmail_quote">On Jan 30, 2008 12:33 PM, Ian Hickson <<a href="mailto:ian@hixie.ch">ian@hixie.ch</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="Ih2E3d">On Wed, 23 Jan 2008, Darin Fisher wrote:<br>><br>> HTTP auth headers may be required to access the internet (e.g., to pass<br>> a request through a proxy server), so this should only apply to the<br>
> Authorization request header, right?<br><br></div><div><div></div><div class="Wj3C7c">On Thu, 24 Jan 2008, Kornel Lesinski wrote:<br>><br>> I don't think that attack vector discussed on mozilla.dev.platform<br>
> should be taken so seriously. In my opinion case when <a ping> enables<br>> attack (instead of being just one of countless possible attack vectors)<br>> is very very unlikely:<br>><br>> - If site accepts data from GET as well as POST (e.g. is using PHP's<br>
> register_globals), then <a ping> is not needed at all -- a better attack<br>> can be performed with simple <img src> or <a href>.<br>><br>> - If site allows HTML from untrusted source and allows ping to slip<br>
> through, it is very likely that the site can be tricked to allow other<br>> potentially dangerous attributes or scripts.<br>><br>> - Because not all browsers/proxies/firewalls send Referer header,<br>> public-facing websites have to accept POSTs without Referer, so<br>
> forbidding Referer for <a ping> may not increase security and even make<br>> it harder to protect against CSRF.<br>><br>> OTOH Referer can help save bandwidth. Without it page may need to<br>> include its own URL in every <a ping> attribute. On pages with lots of<br>
> links (portals, directories) this can noticeably increases size of HTML.<br>><br>> Maybe these problems could be solved with an additional HTTP header in<br>> the ping request? e.g.:<br>><br>> X-Ping: from="<a href="http://example.com/here" target="_blank">http://example.com/here</a>", to="<a href="http://example.com/there" target="_blank">http://example.com/there</a>"<br>
><br>> This would make it easy to protect against unwanted ping-originated<br>> requests (one could configure server or set up application firewall to<br>> filter pings), and URL in <a ping> wouldn't have to contain copies of<br>
> page's URL and href.<br><br></div></div>What do people think of this idea:<br><br>We make "Referer" always have the value "PING".<br><br>We add two headers, "X-Ping-From" which has the value of the page that had<br>
the link, and "X-Ping-To" which has the value of the page that is being<br>opened.<br><br>We continue to send all cookie and authentication headers.<br><br>What do people think? Would this address all the issues raised?</blockquote>
<div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>Seems good to me.  It nicely addresses many of the concerns, and it also makes <a ping> easier to use since you don't have to encode as much information into the value of the ping attribute.</div>
<div><br class="webkit-block-placeholder"></div><div>I suppose that X-Ping-From/To should be striped (like Referer) when one of those values is HTTPS and the ping attribute is non-HTTPS?</div><div><br class="webkit-block-placeholder">
</div><div>-Darin</div></div>