<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: CSP - Mozilla content security policy</title>
	<atom:link href="http://www.thespanner.co.uk/2009/06/23/csp-mozilla-content-security-policy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thespanner.co.uk/2009/06/23/csp-mozilla-content-security-policy/</link>
	<description>A tool for designers dealing with programmers dealing with designers...</description>
	<pubDate>Mon, 15 Mar 2010 10:40:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Gareth Heyes</title>
		<link>http://www.thespanner.co.uk/2009/06/23/csp-mozilla-content-security-policy/#comment-1590</link>
		<dc:creator>Gareth Heyes</dc:creator>
		<pubDate>Tue, 30 Jun 2009 07:47:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/?p=448#comment-1590</guid>
		<description>@Brandon

No probs I'll look forward to testing the beta :)

Regards the meta tag, when http header is used the meta should be ignored IMHO. If the strict rules are followed as in the spec. like the meta follows the head tag then it will be fine.</description>
		<content:encoded><![CDATA[<p>@Brandon</p>
<p>No probs I&#8217;ll look forward to testing the beta <img src='http://www.thespanner.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Regards the meta tag, when http header is used the meta should be ignored IMHO. If the strict rules are followed as in the spec. like the meta follows the head tag then it will be fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon Sterne</title>
		<link>http://www.thespanner.co.uk/2009/06/23/csp-mozilla-content-security-policy/#comment-1589</link>
		<dc:creator>Brandon Sterne</dc:creator>
		<pubDate>Mon, 29 Jun 2009 23:00:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/?p=448#comment-1589</guid>
		<description>Great post, Gareth.  I'd like to respond to a few of the points you brought up.

1.  The E4X trick is a good one.  I have updated the spec to require that external scripts be served with a valid MIME type for JavaScript.  Great catch!

2.  With regard to "no code from strings", Wladimir's post pretty much covers it.  eval provides too much rope for developers to hang themselves with, so CSP turns it off by default.  Of course, sites that absolutely need to use those APIs can turn this restriction off.

3.  Regarding &#60;meta&#62; policy, I think you and Wladimir raised all the relevant points.  There's no specific security risk that an injected &#60;meta&#62; policy introduces, but it could cause bustage for the page.  In fact Sid, one of the developers implementing CSP, has proposed removing it from the design:
http://blog.sidstamm.com/2009/06/csp-with-or-without-meta.html
I don't feel strongly in favor of keeping it, but I do know that some users aren't able to set HTTP headers in their environment.  This is a risk vs. reward that will have to be considered.

Thanks again for the great feedback and I can't wait to see what you'll produce when you get a nightly build in your hands with a working implementation!</description>
		<content:encoded><![CDATA[<p>Great post, Gareth.  I&#8217;d like to respond to a few of the points you brought up.</p>
<p>1.  The E4X trick is a good one.  I have updated the spec to require that external scripts be served with a valid MIME type for JavaScript.  Great catch!</p>
<p>2.  With regard to &#8220;no code from strings&#8221;, Wladimir&#8217;s post pretty much covers it.  eval provides too much rope for developers to hang themselves with, so CSP turns it off by default.  Of course, sites that absolutely need to use those APIs can turn this restriction off.</p>
<p>3.  Regarding &lt;meta&gt; policy, I think you and Wladimir raised all the relevant points.  There&#8217;s no specific security risk that an injected &lt;meta&gt; policy introduces, but it could cause bustage for the page.  In fact Sid, one of the developers implementing CSP, has proposed removing it from the design:<br />
<a href="http://blog.sidstamm.com/2009/06/csp-with-or-without-meta.html" rel="nofollow">http://blog.sidstamm.com/2009/06/csp-with-or-without-meta.html</a><br />
I don&#8217;t feel strongly in favor of keeping it, but I do know that some users aren&#8217;t able to set HTTP headers in their environment.  This is a risk vs. reward that will have to be considered.</p>
<p>Thanks again for the great feedback and I can&#8217;t wait to see what you&#8217;ll produce when you get a nightly build in your hands with a working implementation!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gareth Heyes</title>
		<link>http://www.thespanner.co.uk/2009/06/23/csp-mozilla-content-security-policy/#comment-1586</link>
		<dc:creator>Gareth Heyes</dc:creator>
		<pubDate>Fri, 26 Jun 2009 14:01:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/?p=448#comment-1586</guid>
		<description>@Wladimir

If you can only make the policy stricter this is still no good because you are giving the attacker control over the page. Should an attacker be able to remove the eval function from a page? Or maybe disable images from an external site, yeah it's not as serious as modifying the policy by adding it but it is still an issue IMHO.</description>
		<content:encoded><![CDATA[<p>@Wladimir</p>
<p>If you can only make the policy stricter this is still no good because you are giving the attacker control over the page. Should an attacker be able to remove the eval function from a page? Or maybe disable images from an external site, yeah it&#8217;s not as serious as modifying the policy by adding it but it is still an issue IMHO.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wladimir Palant</title>
		<link>http://www.thespanner.co.uk/2009/06/23/csp-mozilla-content-security-policy/#comment-1585</link>
		<dc:creator>Wladimir Palant</dc:creator>
		<pubDate>Fri, 26 Jun 2009 13:57:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/?p=448#comment-1585</guid>
		<description>Should have been "a few pages" rather than "a few sites" above.</description>
		<content:encoded><![CDATA[<p>Should have been &#8220;a few pages&#8221; rather than &#8220;a few sites&#8221; above.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wladimir Palant</title>
		<link>http://www.thespanner.co.uk/2009/06/23/csp-mozilla-content-security-policy/#comment-1584</link>
		<dc:creator>Wladimir Palant</dc:creator>
		<pubDate>Fri, 26 Jun 2009 13:56:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/?p=448#comment-1584</guid>
		<description>Gareth, the meta tag is in fact not problematic since it can only make the policy stricter - this is of no use to the attacker. But I really wonder how a situation can happen where both the headers and the meta tag can be specified. Probably a server with a generically strict policy (all content served with the same headers) where a few sites want an even stricter policy.</description>
		<content:encoded><![CDATA[<p>Gareth, the meta tag is in fact not problematic since it can only make the policy stricter - this is of no use to the attacker. But I really wonder how a situation can happen where both the headers and the meta tag can be specified. Probably a server with a generically strict policy (all content served with the same headers) where a few sites want an even stricter policy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gareth Heyes</title>
		<link>http://www.thespanner.co.uk/2009/06/23/csp-mozilla-content-security-policy/#comment-1582</link>
		<dc:creator>Gareth Heyes</dc:creator>
		<pubDate>Wed, 24 Jun 2009 08:12:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/?p=448#comment-1582</guid>
		<description>@ebo

I think the more sensible option would be for the http header to take priority when used and ignore an attacker supplied meta tag</description>
		<content:encoded><![CDATA[<p>@ebo</p>
<p>I think the more sensible option would be for the http header to take priority when used and ignore an attacker supplied meta tag</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ebo</title>
		<link>http://www.thespanner.co.uk/2009/06/23/csp-mozilla-content-security-policy/#comment-1581</link>
		<dc:creator>ebo</dc:creator>
		<pubDate>Wed, 24 Jun 2009 08:06:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/?p=448#comment-1581</guid>
		<description>"meta tag could merge policy" If a http header X-Content-Security-Policy is already set, you can't merge the policy with your meta tag. In according to the spec, a new policy will be created from the intersection of the two policies.</description>
		<content:encoded><![CDATA[<p>&#8220;meta tag could merge policy&#8221; If a http header X-Content-Security-Policy is already set, you can&#8217;t merge the policy with your meta tag. In according to the spec, a new policy will be created from the intersection of the two policies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gareth Heyes</title>
		<link>http://www.thespanner.co.uk/2009/06/23/csp-mozilla-content-security-policy/#comment-1580</link>
		<dc:creator>Gareth Heyes</dc:creator>
		<pubDate>Wed, 24 Jun 2009 07:44:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/?p=448#comment-1580</guid>
		<description>@Wladimir

Good point that's the only way it would be of any use.

@sirdarckcat

DOM based attacks wouldn't be useful here because CSP disallows inline script tags. JSON attacks or injection within external scripts would but like I say there are ways of executing code without eval etc. like I'm sure we all know.

BTW I've updated the e4x example to be more realistic</description>
		<content:encoded><![CDATA[<p>@Wladimir</p>
<p>Good point that&#8217;s the only way it would be of any use.</p>
<p>@sirdarckcat</p>
<p>DOM based attacks wouldn&#8217;t be useful here because CSP disallows inline script tags. JSON attacks or injection within external scripts would but like I say there are ways of executing code without eval etc. like I&#8217;m sure we all know.</p>
<p>BTW I&#8217;ve updated the e4x example to be more realistic</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sirdarckcat</title>
		<link>http://www.thespanner.co.uk/2009/06/23/csp-mozilla-content-security-policy/#comment-1579</link>
		<dc:creator>sirdarckcat</dc:creator>
		<pubDate>Wed, 24 Jun 2009 05:26:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/?p=448#comment-1579</guid>
		<description>"code will not be created from strings"
is to avoid dom based xss attacks, anyway Im not sure how they'll try to assess that being that a lot of people uses eval/setTimeout/setInterval/location="javascript:"/etc..

Anyway, I 've been planning to can create something similar to CSP that is cross browser, more flexible and more secure (yay!!) :).

I'll be reviewing the details with a couple of people before releasing the specs.

Greetz!!</description>
		<content:encoded><![CDATA[<p>&#8220;code will not be created from strings&#8221;<br />
is to avoid dom based xss attacks, anyway Im not sure how they&#8217;ll try to assess that being that a lot of people uses eval/setTimeout/setInterval/location=&#8221;javascript:&#8221;/etc..</p>
<p>Anyway, I &#8216;ve been planning to can create something similar to CSP that is cross browser, more flexible and more secure (yay!!) :).</p>
<p>I&#8217;ll be reviewing the details with a couple of people before releasing the specs.</p>
<p>Greetz!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wladimir Palant</title>
		<link>http://www.thespanner.co.uk/2009/06/23/csp-mozilla-content-security-policy/#comment-1578</link>
		<dc:creator>Wladimir Palant</dc:creator>
		<pubDate>Tue, 23 Jun 2009 20:59:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.thespanner.co.uk/?p=448#comment-1578</guid>
		<description>Concerning "code will not be created from strings" - converting a string to code is a common source of vulnerabilities, websites who use it are often careless about what they take as input (e.g. they would eval cookie values). I wrote about this in &lt;a href="http://adblockplus.org/blog/five-wrong-reasons-to-use-eval-in-an-extension" rel="nofollow"&gt;http://adblockplus.org/blog/five-wrong-reasons-to-use-eval-in-an-extension&lt;/a&gt;, only difference for websites is that some alternatives to eval() are not available. However, this is a bad coding pattern that comes from ignorance - disallowing it however means that the web developer is aware of this being a bad choice and knows a better way. So the only case where I can imagine this feature being used is some (knowledgeable) architect making sure his (far less experienced) code monkeys don't use this pattern.</description>
		<content:encoded><![CDATA[<p>Concerning &#8220;code will not be created from strings&#8221; - converting a string to code is a common source of vulnerabilities, websites who use it are often careless about what they take as input (e.g. they would eval cookie values). I wrote about this in <a href="http://adblockplus.org/blog/five-wrong-reasons-to-use-eval-in-an-extension" rel="nofollow">http://adblockplus.org/blog/five-wrong-reasons-to-use-eval-in-an-extension</a>, only difference for websites is that some alternatives to eval() are not available. However, this is a bad coding pattern that comes from ignorance - disallowing it however means that the web developer is aware of this being a bad choice and knows a better way. So the only case where I can imagine this feature being used is some (knowledgeable) architect making sure his (far less experienced) code monkeys don&#8217;t use this pattern.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
