<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Schadenfreude &#187; xss</title>
	<atom:link href="http://www.ralree.com/tag/xss/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ralree.com</link>
	<description>Malicious enjoyment derived from observing someone else's misfortune</description>
	<lastBuildDate>Sat, 21 Jan 2012 20:10:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Implementing Mozilla&#8217;s Content Security Policy</title>
		<link>http://www.ralree.com/2009/06/30/implementing-mozillas-content-security-policy/</link>
		<comments>http://www.ralree.com/2009/06/30/implementing-mozillas-content-security-policy/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 14:00:38 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[site5]]></category>
		<category><![CDATA[vulnerability]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22601</guid>
		<description><![CDATA[I recently discovered this page, which describes Mozilla&#8217;s solution for prevention of XSS (Cross-Site Scripting) available as a Firefox Extension.  Here&#8217;s the HTTP response from my site: hank@tardis:~$ wget -S http://www.ralree.com --2009-06-30 09:52:13--  http://www.ralree.com/ Resolving www.ralree.com... 74.54.115.108 Connecting to www.ralree.com&#124;74.54.115.108&#124;:80... connected. HTTP request sent, awaiting response... HTTP/1.1 200 OK Date: Tue, 30 Jun 2009 13:49:54 GMT Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a Phusion_Passenger/2.1.3 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 X-Powered-By: PHP/5.2.8 X-Pingback: http://www.ralree.com/newblog/xmlrpc.php Last-Modified: Tue, 30 Jun 2009 13:49:21 GMT X-Content-Security-Policy: allow self; img-src [...]]]></description>
			<content:encoded><![CDATA[<p>I recently discovered <a href="http://people.mozilla.org/~bsterne/content-security-policy/index.html">this page</a>, which describes Mozilla&#8217;s solution for prevention of XSS (Cross-Site Scripting) available as a Firefox Extension.  Here&#8217;s the HTTP response from my site:</p>
<pre>hank@tardis:~$ wget -S http://www.ralree.com
--2009-06-30 09:52:13--  http://www.ralree.com/
Resolving www.ralree.com... 74.54.115.108
Connecting to www.ralree.com|74.54.115.108|:80... connected.
HTTP request sent, awaiting response...
 HTTP/1.1 200 OK
 Date: Tue, 30 Jun 2009 13:49:54 GMT
 Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a Phusion_Passenger/2.1.3
   mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
 X-Powered-By: PHP/5.2.8
 X-Pingback: http://www.ralree.com/newblog/xmlrpc.php
 Last-Modified: Tue, 30 Jun 2009 13:49:21 GMT
 <span style="color: #ff0000;">X-Content-Security-Policy: allow self; img-src *; object-src *.ralree.com
  *.ralree.info; script-src *.ralree.com *.ralree.info pagead2.googlesyndication.com
  friendfeed.com; style-src *.ralree.com *.ralree.info</span>
 Content-Length: 57457
 Keep-Alive: timeout=5, max=100
 Connection: Keep-Alive
 Content-Type: text/html; charset=UTF-8</pre>
<p>As you can see, my content security policy is sent as an HTTP header on all HTTP responses from my site.  I basically stole an example from <a href="http://people.mozilla.org/~bsterne/content-security-policy/details.html#examples">this page</a>.  I&#8217;ve attached it in the .htaccess file in my site&#8217;s root, before everything else in there, like so:</p>
<pre>&lt;IfModule mod_headers.c&gt;
Header set X-Content-Security-Policy "allow self; img-src *; object-src *.ralree.com *.ralree.info; script-src *.ralree.com *.ralree.info pagead2.googlesyndication.com friendfeed.com; style-src *.ralree.com *.ralree.info"
&lt;/IfModule&gt;</pre>
<p>I highly recommend everyone with commenting activated on their blog enable this, since XSS is a serious pain.  This seems to work very well on Site5, where mod_headers was simply enabled out of the box.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2009/06/30/implementing-mozillas-content-security-policy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

