<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-4937488729022245645.post649787285609181801..comments</id><updated>2009-03-17T15:39:51.765-05:00</updated><title type='text'>Comments on Stochastic Bytes: Rail Plugin:  param_protected</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.stochasticbytes.com/feeds/649787285609181801/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4937488729022245645/649787285609181801/comments/default'/><link rel='alternate' type='text/html' href='http://blog.stochasticbytes.com/2008/01/paramprotected.html'/><author><name>Christopher J. Bottaro</name><uri>http://www.blogger.com/profile/14116593743589959438</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4937488729022245645.post-6431432462222317293</id><published>2009-03-17T15:39:00.000-05:00</published><updated>2009-03-17T15:39:00.000-05:00</updated><title type='text'>Got rid of that ridiculous syntax to deal with nes...</title><content type='html'>Got rid of that ridiculous syntax to deal with nested params:&lt;BR/&gt;param_protected [&amp;quot;user&amp;quot;, &amp;quot;user/id&amp;quot;, &amp;quot;user/password&amp;quot;]&lt;BR/&gt;&lt;BR/&gt;Now you just say:&lt;BR/&gt;param_protected :user =&amp;gt; [:id, :password]</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4937488729022245645/649787285609181801/comments/default/6431432462222317293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4937488729022245645/649787285609181801/comments/default/6431432462222317293'/><link rel='alternate' type='text/html' href='http://blog.stochasticbytes.com/2008/01/paramprotected.html?showComment=1237322340000#c6431432462222317293' title=''/><author><name>Christopher J. Bottaro</name><uri>http://www.blogger.com/profile/14116593743589959438</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17459206204540304686'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.stochasticbytes.com/2008/01/paramprotected.html' ref='tag:blogger.com,1999:blog-4937488729022245645.post-649787285609181801' source='http://www.blogger.com/feeds/4937488729022245645/posts/default/649787285609181801' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-4937488729022245645.post-2561659743872284902</id><published>2008-03-24T22:00:00.000-05:00</published><updated>2008-03-24T22:00:00.000-05:00</updated><title type='text'>Ok, I implemented whitelisting (param_accessible) ...</title><content type='html'>Ok, I implemented whitelisting (param_accessible) and also the features I talked about in the previous comment.&lt;BR/&gt;&lt;BR/&gt;Please see the &lt;A HREF="http://www.stochasticbytes.com/doc/param_protected/README.html" REL="nofollow"&gt;README&lt;/A&gt; for documentation.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4937488729022245645/649787285609181801/comments/default/2561659743872284902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4937488729022245645/649787285609181801/comments/default/2561659743872284902'/><link rel='alternate' type='text/html' href='http://blog.stochasticbytes.com/2008/01/paramprotected.html?showComment=1206414000000#c2561659743872284902' title=''/><author><name>Christopher J. Bottaro</name><uri>http://www.blogger.com/profile/14116593743589959438</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17459206204540304686'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.stochasticbytes.com/2008/01/paramprotected.html' ref='tag:blogger.com,1999:blog-4937488729022245645.post-649787285609181801' source='http://www.blogger.com/feeds/4937488729022245645/posts/default/649787285609181801' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-4937488729022245645.post-4849852132996172084</id><published>2008-03-11T02:09:00.000-05:00</published><updated>2008-03-11T02:09:00.000-05:00</updated><title type='text'>Hello mina,Yes, param_accessible is in the works. ...</title><content type='html'>Hello mina,&lt;BR/&gt;&lt;BR/&gt;Yes, param_accessible is in the works.  I'm also working on cleaning up the code and making it more efficient, but the big feature is having it work with arrays...&lt;BR/&gt;&lt;BR/&gt;For example you have a form with inputs like this:&lt;BR/&gt;&amp;lt;input name="names[][first]" /&amp;gt;&lt;BR/&gt;&amp;lt;input name="names[][middle]" /&amp;gt;&lt;BR/&gt;&amp;lt;input name="names[][last]" /&amp;gt;&lt;BR/&gt;&lt;BR/&gt;And thus params that come across like:&lt;BR/&gt;{ :names =&gt; [ {:first =&gt; Jane, :middle =&gt; Rae, :last =&gt; Doe}, {:first =&gt; John, :middle =&gt; Rambo, :last =&gt; Doe} ] }&lt;BR/&gt;&lt;BR/&gt;Then you can say:&lt;BR/&gt;param_protected 'names/middle'&lt;BR/&gt;&lt;BR/&gt;And it will trim the params to:&lt;BR/&gt;{ :names =&gt; [ {:first =&gt; Jane, :last =&gt; Doe}, {:first =&gt; John, :last =&gt; Doe} ] }&lt;BR/&gt;&lt;BR/&gt;Hopefully I can knock that out in a couple weeks.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4937488729022245645/649787285609181801/comments/default/4849852132996172084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4937488729022245645/649787285609181801/comments/default/4849852132996172084'/><link rel='alternate' type='text/html' href='http://blog.stochasticbytes.com/2008/01/paramprotected.html?showComment=1205219340000#c4849852132996172084' title=''/><author><name>Christopher J. Bottaro</name><uri>http://www.blogger.com/profile/14116593743589959438</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17459206204540304686'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.stochasticbytes.com/2008/01/paramprotected.html' ref='tag:blogger.com,1999:blog-4937488729022245645.post-649787285609181801' source='http://www.blogger.com/feeds/4937488729022245645/posts/default/649787285609181801' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-4937488729022245645.post-5170687308033522898</id><published>2008-03-10T15:40:00.000-05:00</published><updated>2008-03-10T15:40:00.000-05:00</updated><title type='text'>Very cool work Christopher (especially with the ne...</title><content type='html'>Very cool work Christopher (especially with the nested stuff).  I completely agree with your sentiments.  I still think there's still a place for attr_protected in the model for truly immutable attributes like :id, but the rest of the filtering is more suited as you've mentioned in the controller.  &lt;BR/&gt;&lt;BR/&gt;My beef though with attr_protect (and param_protected) is that they're blacklists which, in case of filtering, are much less effective security-wise compared to whitelists.&lt;BR/&gt;&lt;BR/&gt;Do you have plans for a param_allowed ;-) ?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4937488729022245645/649787285609181801/comments/default/5170687308033522898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4937488729022245645/649787285609181801/comments/default/5170687308033522898'/><link rel='alternate' type='text/html' href='http://blog.stochasticbytes.com/2008/01/paramprotected.html?showComment=1205181600000#c5170687308033522898' title=''/><author><name>Mina</name><uri>http://www.blogger.com/profile/07158720619849676403</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.stochasticbytes.com/2008/01/paramprotected.html' ref='tag:blogger.com,1999:blog-4937488729022245645.post-649787285609181801' source='http://www.blogger.com/feeds/4937488729022245645/posts/default/649787285609181801' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-4937488729022245645.post-2563445388430074595</id><published>2008-01-21T20:57:00.000-06:00</published><updated>2008-01-21T20:57:00.000-06:00</updated><title type='text'>Alright, it now works with nested params.param_pro...</title><content type='html'>Alright, it now works with nested params.&lt;BR/&gt;&lt;BR/&gt;param_protected 'user/user_id'&lt;BR/&gt;&lt;BR/&gt;will now remove params[:user][:user_id].&lt;BR/&gt;&lt;BR/&gt;This has not been extensively tested, so please let me know about any bugs.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4937488729022245645/649787285609181801/comments/default/2563445388430074595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4937488729022245645/649787285609181801/comments/default/2563445388430074595'/><link rel='alternate' type='text/html' href='http://blog.stochasticbytes.com/2008/01/paramprotected.html?showComment=1200970620000#c2563445388430074595' title=''/><author><name>Christopher J. Bottaro</name><uri>http://www.blogger.com/profile/14116593743589959438</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17459206204540304686'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.stochasticbytes.com/2008/01/paramprotected.html' ref='tag:blogger.com,1999:blog-4937488729022245645.post-649787285609181801' source='http://www.blogger.com/feeds/4937488729022245645/posts/default/649787285609181801' type='text/html'/></entry></feed>