<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Insecurity is Ruby on Rails Best Practice</title>
	<atom:link href="http://ianloic.com/2007/05/18/insecurity_is_ruby_on_rails_best_practice/feed/" rel="self" type="application/rss+xml" />
	<link>http://ianloic.com/2007/05/18/insecurity_is_ruby_on_rails_best_practice/</link>
	<description>from Ian McKellar</description>
	<lastBuildDate>Fri, 20 Nov 2009 18:09:37 -0800</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Paul</title>
		<link>http://ianloic.com/2007/05/18/insecurity_is_ruby_on_rails_best_practice/comment-page-1/#comment-1556</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Mon, 19 Oct 2009 05:16:34 +0000</pubDate>
		<guid isPermaLink="false">#comment-1556</guid>
		<description>This blog post ranked pretty high in a Google search I did, so I thought I should say this in case someone unfamiliar with Rails finds it.

The issues mentioned in the blog post have all been address in Rails. All Rails&#039; form helpers include a hidden field to protect against CSRF. You rarely have to even think about this issue anymore.

Rails also now discourages allowing GET requests when they shouldn&#039;t be allowed.</description>
		<content:encoded><![CDATA[<p>This blog post ranked pretty high in a Google search I did, so I thought I should say this in case someone unfamiliar with Rails finds it.</p>
<p>The issues mentioned in the blog post have all been address in Rails. All Rails&#8217; form helpers include a hidden field to protect against CSRF. You rarely have to even think about this issue anymore.</p>
<p>Rails also now discourages allowing GET requests when they shouldn&#8217;t be allowed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Koziarski</title>
		<link>http://ianloic.com/2007/05/18/insecurity_is_ruby_on_rails_best_practice/comment-page-1/#comment-387</link>
		<dc:creator>Michael Koziarski</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-387</guid>
		<description>As rick mentioned above, As rick mentioned above, there&#039;s a simple plugin you can include to instantly secure your application against basically all CSRF attacks, odds are it&#039;ll be part of rails 2.0, but until then it&#039;s a one liner to install.  If you&#039;re using the 1.2 REST methods your application is automatically safe for GETs, and that&#039;s &#039;ruby on rails best practice&#039;.

I&#039;m not sure what your intentions were when posting this,  but the fact you posted this without mentioning the potential security problems to the sites in question raises some questions about your motives.  The  inflammatory title, and your ignoring rick&#039;s comments makes it seem worse.  All the best anyways, and here&#039;s hoping CSRF  becomes as easy to fix in all those other web frameworks :)

</description>
		<content:encoded><![CDATA[<p>As rick mentioned above, As rick mentioned above, there&#8217;s a simple plugin you can include to instantly secure your application against basically all CSRF attacks, odds are it&#8217;ll be part of rails 2.0, but until then it&#8217;s a one liner to install.  If you&#8217;re using the 1.2 REST methods your application is automatically safe for GETs, and that&#8217;s &#8216;ruby on rails best practice&#8217;.</p>
<p>I&#8217;m not sure what your intentions were when posting this,  but the fact you posted this without mentioning the potential security problems to the sites in question raises some questions about your motives.  The  inflammatory title, and your ignoring rick&#8217;s comments makes it seem worse.  All the best anyways, and here&#8217;s hoping CSRF  becomes as easy to fix in all those other web frameworks <img src='http://ianloic.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://ianloic.com/2007/05/18/insecurity_is_ruby_on_rails_best_practice/comment-page-1/#comment-388</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-388</guid>
		<description>Interesting article marred by the obvious anti-rails bias By using the title &quot;Insecurity is Ruby on Rails Best Practice&quot; you seem to be indicating that the &lt;em&gt;best&lt;/em&gt; thing about Rails is the insecurity of it, therefore everything else must be worse.

I aggree with Michael Koziarski&#039;s questioning of your motives. Was this a mistake, an attempt to get on digg or do you just not like rails (do you seriously believe that the best feature of rails is it&#039;s insecurity)?  I notice this site uses Drupal so you obviously have a preference, but this wasn&#039;t declared and as this article seems to be trying provide an objective look at CSRF attacks/security I think it would have been wise.

The content was useful, thanks, but you would have got a lot more respect from me for it if you were more up-front about your bias and motives.</description>
		<content:encoded><![CDATA[<p>Interesting article marred by the obvious anti-rails bias By using the title &#8220;Insecurity is Ruby on Rails Best Practice&#8221; you seem to be indicating that the <em>best</em> thing about Rails is the insecurity of it, therefore everything else must be worse.</p>
<p>I aggree with Michael Koziarski&#8217;s questioning of your motives. Was this a mistake, an attempt to get on digg or do you just not like rails (do you seriously believe that the best feature of rails is it&#8217;s insecurity)?  I notice this site uses Drupal so you obviously have a preference, but this wasn&#8217;t declared and as this article seems to be trying provide an objective look at CSRF attacks/security I think it would have been wise.</p>
<p>The content was useful, thanks, but you would have got a lot more respect from me for it if you were more up-front about your bias and motives.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://ianloic.com/2007/05/18/insecurity_is_ruby_on_rails_best_practice/comment-page-1/#comment-389</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-389</guid>
		<description>Checking the HTTP Referrer Checking the HTTP Referrer is not a good idea. Firstly, there are valid reasons why the user could have the Referrer header feature turned off in their web browser. Secondly, an attacker can forge an HTTP Referrer header, although (probably) not via a CSRF.</description>
		<content:encoded><![CDATA[<p>Checking the HTTP Referrer Checking the HTTP Referrer is not a good idea. Firstly, there are valid reasons why the user could have the Referrer header feature turned off in their web browser. Secondly, an attacker can forge an HTTP Referrer header, although (probably) not via a CSRF.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke</title>
		<link>http://ianloic.com/2007/05/18/insecurity_is_ruby_on_rails_best_practice/comment-page-1/#comment-390</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-390</guid>
		<description>general problem in the web as michael and rick mentioned above, the whole REST approach in rails 1.2 solves the GET/POST unclarity problem.
and the other thing you&#039;re mentioning, about submitting forms from an other site, has nothing to do with rails. this is a general problem in the web and i think you&#039;re suggestion with the secret token would be a way in the wrong direction (because it&#039;s not RESTful). in my opinion this should be the job of the browser. the user should get a warning popup, or whatever, for every request he submits (except GETs) pointing to a different host than the current one.</description>
		<content:encoded><![CDATA[<p>general problem in the web as michael and rick mentioned above, the whole REST approach in rails 1.2 solves the GET/POST unclarity problem.<br />
and the other thing you&#8217;re mentioning, about submitting forms from an other site, has nothing to do with rails. this is a general problem in the web and i think you&#8217;re suggestion with the secret token would be a way in the wrong direction (because it&#8217;s not RESTful). in my opinion this should be the job of the browser. the user should get a warning popup, or whatever, for every request he submits (except GETs) pointing to a different host than the current one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian McKellar</title>
		<link>http://ianloic.com/2007/05/18/insecurity_is_ruby_on_rails_best_practice/comment-page-1/#comment-391</link>
		<dc:creator>Ian McKellar</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-391</guid>
		<description>I don&#039;t have any motives I don&#039;t have any motives beyond raising some concerning issues. I realized this was a problem when I started digging around a major rails site some friends were developing. I use Drupal as a counterexample of a framework that does protect against this kind of attack because I was looking through the forms it was generating and was pleasantly surprised to discover it takes care of this problem automatically.

And I don&#039;t think the best feature of rails is its insecurity, nor do I think I suggested that. I suggested that the best-practice - the techniques that are used by the most prominent rails developers (such as 37signals) and are taught in the most prominent rails tutorials and books are insecure in was that are not obvious to most developers. That&#039;s a real concern to me.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t have any motives I don&#8217;t have any motives beyond raising some concerning issues. I realized this was a problem when I started digging around a major rails site some friends were developing. I use Drupal as a counterexample of a framework that does protect against this kind of attack because I was looking through the forms it was generating and was pleasantly surprised to discover it takes care of this problem automatically.</p>
<p>And I don&#8217;t think the best feature of rails is its insecurity, nor do I think I suggested that. I suggested that the best-practice &#8211; the techniques that are used by the most prominent rails developers (such as 37signals) and are taught in the most prominent rails tutorials and books are insecure in was that are not obvious to most developers. That&#8217;s a real concern to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian McKellar</title>
		<link>http://ianloic.com/2007/05/18/insecurity_is_ruby_on_rails_best_practice/comment-page-1/#comment-392</link>
		<dc:creator>Ian McKellar</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-392</guid>
		<description>Well, being digg-bait wasn&#039;t Well, being digg-bait wasn&#039;t really the point, otherwise I would have made it &quot;10 something somethings&quot;. But the title was intended to be a bit provocative.

What I mean by it is that the practices that are used by the flagship rails sites and the techniques that are taught in the Rails tutorials and books are insecure. And that insecurity isn&#039;t understood well by the community.</description>
		<content:encoded><![CDATA[<p>Well, being digg-bait wasn&#8217;t Well, being digg-bait wasn&#8217;t really the point, otherwise I would have made it &#8220;10 something somethings&#8221;. But the title was intended to be a bit provocative.</p>
<p>What I mean by it is that the practices that are used by the flagship rails sites and the techniques that are taught in the Rails tutorials and books are insecure. And that insecurity isn&#8217;t understood well by the community.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Pitts</title>
		<link>http://ianloic.com/2007/05/18/insecurity_is_ruby_on_rails_best_practice/comment-page-1/#comment-393</link>
		<dc:creator>Jamie Pitts</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-393</guid>
		<description>Trolling is any blogger&#039;s best practice You are guilty of trolling the Rails community, but I do appreciate your exposing this important issue! Of course, I am guilty of feeding into your successful trolling by responding...

I am not sure if building more restrictions into Rails and other app frameworks will solve the issue of common developer carelessness - with each security-related convenience, dangers such as performing state-changing operations with GETs will seem that much farther away and that much more likely to be imappropriately placed into a seemingly innoculous method such as &quot;show&quot;. However, security through convenience can be effectively encourage through &quot;easier means to do the right thing&quot; - such as how ActiveRecord enables the programmer to &lt;a href=&quot;http://manuals.rubyonrails.com/read/chapter/43&quot;&gt;prevent sql injection attacks&lt;/a&gt;. 

In developing &lt;a href=&quot;http://www.memecat.com&quot;&gt;my first Rails app&lt;/a&gt;, I put logic in the controller methods to prevent state-changing GETs. I am somewhat negative about the new REST approach in 1.2 on first blush. This could be made a lot easier with a standard one-line before_filter to identify methods that can only process a POST request.

Lastly, Luke&#039;s suggestion is interesting and should be closely considered by browser developers: &quot;in my opinion this should be the job of the browser. the user should get a warning popup, or whatever, for every request he submits (except GETs) pointing to a different host than the current one.&quot;

- Jamie</description>
		<content:encoded><![CDATA[<p>Trolling is any blogger&#8217;s best practice You are guilty of trolling the Rails community, but I do appreciate your exposing this important issue! Of course, I am guilty of feeding into your successful trolling by responding&#8230;</p>
<p>I am not sure if building more restrictions into Rails and other app frameworks will solve the issue of common developer carelessness &#8211; with each security-related convenience, dangers such as performing state-changing operations with GETs will seem that much farther away and that much more likely to be imappropriately placed into a seemingly innoculous method such as &#8220;show&#8221;. However, security through convenience can be effectively encourage through &#8220;easier means to do the right thing&#8221; &#8211; such as how ActiveRecord enables the programmer to <a href="http://manuals.rubyonrails.com/read/chapter/43">prevent sql injection attacks</a>. </p>
<p>In developing <a href="http://www.memecat.com">my first Rails app</a>, I put logic in the controller methods to prevent state-changing GETs. I am somewhat negative about the new REST approach in 1.2 on first blush. This could be made a lot easier with a standard one-line before_filter to identify methods that can only process a POST request.</p>
<p>Lastly, Luke&#8217;s suggestion is interesting and should be closely considered by browser developers: &#8220;in my opinion this should be the job of the browser. the user should get a warning popup, or whatever, for every request he submits (except GETs) pointing to a different host than the current one.&#8221;</p>
<p>- Jamie</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian McKellar</title>
		<link>http://ianloic.com/2007/05/18/insecurity_is_ruby_on_rails_best_practice/comment-page-1/#comment-394</link>
		<dc:creator>Ian McKellar</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-394</guid>
		<description>Is it still a troll if I Is it still a troll if I have a valid point?

The reason I blame Rails and not Rails application developers is that the framework seems to abstract away and hide so many ugly details. 

As for Luke&#039;s suggestion of modifying browser behavior, I think that&#039;s ridiculous. Perhaps I&#039;m coming from the perspective of being a six year browser development veteran, but we&#039;ve had the cookies web security model for ten years now. I don&#039;t want to give it up and introduce yet-another security popup just so someone can have their &quot;rest&quot; URLs. Since it&#039;s hard enough to get CSS implemented in popular browsers I wouldn&#039;t hold my breath for this.</description>
		<content:encoded><![CDATA[<p>Is it still a troll if I Is it still a troll if I have a valid point?</p>
<p>The reason I blame Rails and not Rails application developers is that the framework seems to abstract away and hide so many ugly details. </p>
<p>As for Luke&#8217;s suggestion of modifying browser behavior, I think that&#8217;s ridiculous. Perhaps I&#8217;m coming from the perspective of being a six year browser development veteran, but we&#8217;ve had the cookies web security model for ten years now. I don&#8217;t want to give it up and introduce yet-another security popup just so someone can have their &#8220;rest&#8221; URLs. Since it&#8217;s hard enough to get CSS implemented in popular browsers I wouldn&#8217;t hold my breath for this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timothy F.</title>
		<link>http://ianloic.com/2007/05/18/insecurity_is_ruby_on_rails_best_practice/comment-page-1/#comment-395</link>
		<dc:creator>Timothy F.</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-395</guid>
		<description>interesting point You&#039;re point is actually very interesting. And I think you&#039;re right, this isn&#039;t really the job of the webapplication but the browser&#039;s one. HTTP supposed to be a stateless protocol and although there are some exceptions to this (sessions/cookies) we shouldn&#039;t treat a webapplication like a normal application. Trying to control the workflow with some mysterious hashes sending over with every request is just not how the web should work. The web supposed to be as simple as possible and everything else should be reconsidered because there&#039;s probably a better solution.</description>
		<content:encoded><![CDATA[<p>interesting point You&#8217;re point is actually very interesting. And I think you&#8217;re right, this isn&#8217;t really the job of the webapplication but the browser&#8217;s one. HTTP supposed to be a stateless protocol and although there are some exceptions to this (sessions/cookies) we shouldn&#8217;t treat a webapplication like a normal application. Trying to control the workflow with some mysterious hashes sending over with every request is just not how the web should work. The web supposed to be as simple as possible and everything else should be reconsidered because there&#8217;s probably a better solution.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
