<div dir="ltr">On Mon, Sep 29, 2008 at 9:54 PM, Hallvord R M Steen <span dir="ltr"><<a href="mailto:hallvors@gmail.com">hallvors@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
To give webmasters more ways to deal with this situation, I think we<br>
should implement the Access Control "Origin" HTTP-header only<br>
(assuming that it should refer to the top site in the frameset<br>
hierarchy).<br>
<br>
Reasoning:<br>
<br>
Sites may want to use any of several policies in a "somebody framed<br>
me" situation. For example, these are all policies a site may want to<br>
deploy:<br>
<br>
1. nobody may frame my content<br>
2. selected sites only may frame my content<br>
3. anyone may frame my content but not re-use an existing session<br>
4. anyone may frame my content<br>
<br>
Giving the site an "Origin: <a href="http://www.example.com" target="_blank">http://www.example.com</a>" HTTP header in the<br>
intial request lets the backend implement any of these policies.<br>
Instead of responding with a payload that always includes some variant<br>
of the proposed "X-I-Do-Not-Want-To-Be-Framed-Across-Domains: yes"<br>
header, the site can send or redirect to a framebreaking "embedding<br>
forbidden" page for policy #1. It can do so selectively based on<br>
origin site and/or requested content for policy #2. It can kill<br>
existing cookies, void session and set new origin-specific cookies for<br>
policy #3.)<br>
</blockquote><div><br>That's good to have and we should definitely do it, but there are a couple of reasons "Same-Origin-Only-Unless-<div class="Ih2E3d">Access-Controls-Says-Otherwise" would be useful as well:<br>
-- a bit simpler to implement on the server<br>-- for privacy reasons some UAs in some situations might not want to expose the origin to the IFRAME's server; allowing the origin check to happen on the client would handle that<br>
<br></div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">IMO the only UI precaution we can/should do if possible is to make<br>
transparent IFRAMEs "transparent to events" - basically un-focusable.<br>
</blockquote><div><br>If you check for opacity:0, I can use opacity:0.01. At what level of opacity would the IFRAME become transparent to events? And it would leave a whole lot of other attacks wide open. So I don't think it's worth doing anything here.<br>
</div><br></div>Rob<br>-- <br>"He was pierced for our transgressions, he was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed. We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all." [Isaiah 53:5-6]<br>
</div>