<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Finding and fixing mass assignment problems in Rails applications</title>
	<atom:link href="http://blog.mhartl.com/2008/09/21/finding-and-fixing-mass-assignment-problems-in-rails-applications/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mhartl.com/2008/09/21/finding-and-fixing-mass-assignment-problems-in-rails-applications/</link>
	<description>Michael Hartl&#039;s tech blog</description>
	<lastBuildDate>Sat, 06 Mar 2010 17:10:54 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mister Cox</title>
		<link>http://blog.mhartl.com/2008/09/21/finding-and-fixing-mass-assignment-problems-in-rails-applications/#comment-250</link>
		<dc:creator>Mister Cox</dc:creator>
		<pubDate>Tue, 09 Feb 2010 19:25:17 +0000</pubDate>
		<guid isPermaLink="false">http://insoshi.wordpress.com/?p=91#comment-250</guid>
		<description>Ah, thanks! This cleared up some contradictions I&#039;ve heard.</description>
		<content:encoded><![CDATA[<p>Ah, thanks! This cleared up some contradictions I&#8217;ve heard.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LRBlog &#187; Blog Archive &#187; Bypassing mass assignment for update_attributes</title>
		<link>http://blog.mhartl.com/2008/09/21/finding-and-fixing-mass-assignment-problems-in-rails-applications/#comment-178</link>
		<dc:creator>LRBlog &#187; Blog Archive &#187; Bypassing mass assignment for update_attributes</dc:creator>
		<pubDate>Sat, 14 Mar 2009 21:45:11 +0000</pubDate>
		<guid isPermaLink="false">http://insoshi.wordpress.com/?p=91#comment-178</guid>
		<description>[...] been following this excellent post by M. Hartl and this post by E. Chapweske banishing mass assignment from one of my Rails applications due to [...]</description>
		<content:encoded><![CDATA[<p>[...] been following this excellent post by M. Hartl and this post by E. Chapweske banishing mass assignment from one of my Rails applications due to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allan L.</title>
		<link>http://blog.mhartl.com/2008/09/21/finding-and-fixing-mass-assignment-problems-in-rails-applications/#comment-160</link>
		<dc:creator>Allan L.</dc:creator>
		<pubDate>Sun, 16 Nov 2008 06:42:15 +0000</pubDate>
		<guid isPermaLink="false">http://insoshi.wordpress.com/?p=91#comment-160</guid>
		<description>Bless you, sir, for this write up and for the plugin!

Used it on my current project, showed me exactly where I needed to tighten things up.</description>
		<content:encoded><![CDATA[<p>Bless you, sir, for this write up and for the plugin!</p>
<p>Used it on my current project, showed me exactly where I needed to tighten things up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mhartl</title>
		<link>http://blog.mhartl.com/2008/09/21/finding-and-fixing-mass-assignment-problems-in-rails-applications/#comment-107</link>
		<dc:creator>mhartl</dc:creator>
		<pubDate>Wed, 24 Sep 2008 17:25:05 +0000</pubDate>
		<guid isPermaLink="false">http://insoshi.wordpress.com/?p=91#comment-107</guid>
		<description>Oh, I see what you mean.  There&#039;s no way in general for the plugin to distinguish between a true mass assignment problem and code that just looks that way.  It simply flags &lt;em&gt;possible&lt;/em&gt; mass assignment issues.  As noted in the final example from the post, that means that it catches some code in the Insoshi Photos controller that is actually safe.  The programmer (in this case, me) has to realize it&#039;s not actually a bug.

Ultimately, the plugin&#039;s output does rely on the programmer&#039;s judgment to determine if the mass assignment in question is a problem or not.  I&#039;d love to improve its ability to discriminate between problems and non-problems, so if you think of any way to do that please fork the project on GitHub and send the changes my way.</description>
		<content:encoded><![CDATA[<p>Oh, I see what you mean.  There&#8217;s no way in general for the plugin to distinguish between a true mass assignment problem and code that just looks that way.  It simply flags <em>possible</em> mass assignment issues.  As noted in the final example from the post, that means that it catches some code in the Insoshi Photos controller that is actually safe.  The programmer (in this case, me) has to realize it&#8217;s not actually a bug.</p>
<p>Ultimately, the plugin&#8217;s output does rely on the programmer&#8217;s judgment to determine if the mass assignment in question is a problem or not.  I&#8217;d love to improve its ability to discriminate between problems and non-problems, so if you think of any way to do that please fork the project on GitHub and send the changes my way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil</title>
		<link>http://blog.mhartl.com/2008/09/21/finding-and-fixing-mass-assignment-problems-in-rails-applications/#comment-106</link>
		<dc:creator>Neil</dc:creator>
		<pubDate>Wed, 24 Sep 2008 07:11:19 +0000</pubDate>
		<guid isPermaLink="false">http://insoshi.wordpress.com/?p=91#comment-106</guid>
		<description>Sorry, Michael. I didn&#039;t make myself clear enough on this one. The plugin (IIRC) highlights my second example as a &#039;mass assignment&#039; loophole, when it isn&#039;t. I was suggesting the plugin could be altered to exclude these instances in MA results. I think this is a fantastic plugin and should be a part of every pre-deployment check, so that&#039;s why I think the change is worth doing.</description>
		<content:encoded><![CDATA[<p>Sorry, Michael. I didn&#8217;t make myself clear enough on this one. The plugin (IIRC) highlights my second example as a &#8216;mass assignment&#8217; loophole, when it isn&#8217;t. I was suggesting the plugin could be altered to exclude these instances in MA results. I think this is a fantastic plugin and should be a part of every pre-deployment check, so that&#8217;s why I think the change is worth doing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mhartl</title>
		<link>http://blog.mhartl.com/2008/09/21/finding-and-fixing-mass-assignment-problems-in-rails-applications/#comment-105</link>
		<dc:creator>mhartl</dc:creator>
		<pubDate>Tue, 23 Sep 2008 16:55:32 +0000</pubDate>
		<guid isPermaLink="false">http://insoshi.wordpress.com/?p=91#comment-105</guid>
		<description>@Neil: There&#039;s no need for a plugin in your case.  Just write

Comment.update_attributes(:body =&gt; params[:comment][:body], :title =&gt; params[:comment][:title])

Since you provide the hash keys explicitly, this statement is not susceptible to mass assignment vulnerabilities.</description>
		<content:encoded><![CDATA[<p>@Neil: There&#8217;s no need for a plugin in your case.  Just write</p>
<p>Comment.update_attributes(:body =&gt; params[:comment][:body], :title =&gt; params[:comment][:title])</p>
<p>Since you provide the hash keys explicitly, this statement is not susceptible to mass assignment vulnerabilities.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil</title>
		<link>http://blog.mhartl.com/2008/09/21/finding-and-fixing-mass-assignment-problems-in-rails-applications/#comment-104</link>
		<dc:creator>Neil</dc:creator>
		<pubDate>Tue, 23 Sep 2008 08:13:45 +0000</pubDate>
		<guid isPermaLink="false">http://insoshi.wordpress.com/?p=91#comment-104</guid>
		<description>Michael, thanks for this - it&#039;s very, very useful! I&#039;m using Paperclip instead of Attachment_fu so I get to avoid those issues.

I do have one suggestion (although, being a Rails newbie, I don&#039;t know much about how the plugin works, or if this is even a worthy suggestion - but here goes...); 

Could you make the plugin search specifically for;

@comment = Comment.update_attributes(params[:comment])

...instead of 

@comment = Comment.update_attributes({:body, params[:comment][:body], :title, params[:comment][:title]})

I found a couple of examples where the plugin told me I had MA holes when I was only assigning a couple of new attributes. 

Cheers</description>
		<content:encoded><![CDATA[<p>Michael, thanks for this &#8211; it&#8217;s very, very useful! I&#8217;m using Paperclip instead of Attachment_fu so I get to avoid those issues.</p>
<p>I do have one suggestion (although, being a Rails newbie, I don&#8217;t know much about how the plugin works, or if this is even a worthy suggestion &#8211; but here goes&#8230;); </p>
<p>Could you make the plugin search specifically for;</p>
<p>@comment = Comment.update_attributes(params[:comment])</p>
<p>&#8230;instead of </p>
<p>@comment = Comment.update_attributes({:body, params[:comment][:body], :title, params[:comment][:title]})</p>
<p>I found a couple of examples where the plugin told me I had MA holes when I was only assigning a couple of new attributes. </p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Schofield</title>
		<link>http://blog.mhartl.com/2008/09/21/finding-and-fixing-mass-assignment-problems-in-rails-applications/#comment-103</link>
		<dc:creator>Sean Schofield</dc:creator>
		<pubDate>Tue, 23 Sep 2008 01:16:20 +0000</pubDate>
		<guid isPermaLink="false">http://insoshi.wordpress.com/?p=91#comment-103</guid>
		<description>Thanks for the tip on using attr_protected with attachment_fu.  That saved me a little bit of aggravation.</description>
		<content:encoded><![CDATA[<p>Thanks for the tip on using attr_protected with attachment_fu.  That saved me a little bit of aggravation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://blog.mhartl.com/2008/09/21/finding-and-fixing-mass-assignment-problems-in-rails-applications/#comment-102</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Mon, 22 Sep 2008 06:17:32 +0000</pubDate>
		<guid isPermaLink="false">http://insoshi.wordpress.com/?p=91#comment-102</guid>
		<description>Thanks for highlighting the testing problem, these are some great tips.</description>
		<content:encoded><![CDATA[<p>Thanks for highlighting the testing problem, these are some great tips.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mass assignment in Rails applications &#171; Insoshi Ruby on Rails blog</title>
		<link>http://blog.mhartl.com/2008/09/21/finding-and-fixing-mass-assignment-problems-in-rails-applications/#comment-96</link>
		<dc:creator>Mass assignment in Rails applications &#171; Insoshi Ruby on Rails blog</dc:creator>
		<pubDate>Mon, 22 Sep 2008 01:19:49 +0000</pubDate>
		<guid isPermaLink="false">http://insoshi.wordpress.com/?p=91#comment-96</guid>
		<description>[...] by an email from Eric Chapweske of Slantwise Design, I recently audited the Insoshi social network for mass assignment vulnerabilities. Doing this manually was annoying, so in the process I developed a simple plugin to find likely [...]</description>
		<content:encoded><![CDATA[<p>[...] by an email from Eric Chapweske of Slantwise Design, I recently audited the Insoshi social network for mass assignment vulnerabilities. Doing this manually was annoying, so in the process I developed a simple plugin to find likely [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
