<?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>Kai Ramuenke &#187; Add new tag</title>
	<atom:link href="http://www.ramuenke.de/archives/tag/add-new-tag/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ramuenke.de</link>
	<description>Just another agile software development blog</description>
	<lastBuildDate>Wed, 20 May 2009 13:28:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Http-only session cookie</title>
		<link>http://www.ramuenke.de/archives/42</link>
		<comments>http://www.ramuenke.de/archives/42#comments</comments>
		<pubDate>Wed, 20 May 2009 13:28:25 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Agile Software Development]]></category>
		<category><![CDATA[ThoughtBlog]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.ramuenke.de/?p=42</guid>
		<description><![CDATA[In my last post i explained, how to test session protected resources with selenium rc and ruby. While we were migrating to Rails 2.3 all such tests suddenly stopped working because the JavaScript didn&#8217;t return the session cookie anymore. After some research we found out that you can control accessibility to the session cookie through [...]]]></description>
			<content:encoded><![CDATA[<p>In my last <a href="http://www.ramuenke.de/archives/39">post</a> i explained, how to test session protected resources with selenium rc and ruby. While we were migrating to Rails 2.3 all such tests suddenly stopped working because the JavaScript didn&#8217;t return the session cookie anymore. After some research we found out that you can control accessibility to the session cookie through the browser by sending a little flag in the HTTP response header for Set-Cookie.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">response.<span style="color: #006633;">setHeader</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Set-Cookie&quot;</span>, <span style="color: #0000ff;">&quot;cookie_name=cookie_value; HTTPOnly=&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>By setting this flag you basically prevent any JavaScript from accessing the session cookie. Rails now sets this flag by default which makes it less vulnerably against cross scripting attacks.<br />
You can find all information you need including a list of supporting browsers <a href="http://www.owasp.org/index.php/HTTPOnly">here</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ramuenke.de/archives/42/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
