News for hackers. Stuff that matters.
Re:Multiple vulnerabilities in parameter parsing in Action Pack by lambda on Wednesday January 09, 2013 @12:03AM (#5030251)
Less magic.

The more magic, unexpected behavior you have when parsing untrusted input, the more likely you are to have security holes.

Instead of building up some complex object based on untrusted input, the author of the application should specify the values and types expected, and the parser should parse those and nothing more. This would lead to much simpler code paths, as the user never has an object that has unexpected keys, values, behaviors, etc. Don't parse the object using complex, general purpose code, then hand the user an object that they have to treat specially; if their form only expects 5 values of given types, then parse only those values and those types.

The problem is, all of this kind of magic is at the very heart of what Rails is. I don't know if you could eliminate it all and still have Rails be Rails.

Re:Multiple vulnerabilities in parameter parsing in Action Pack by nthj on Wednesday January 09, 2013 @02:36AM (#5030617)
This sounds a lot like strong_parameters, which (I believe) will be the default in Rails 4, and is only a gem install away from Rails 3.2 apps.

https://github.com/rails/strong_parameters

Re:Multiple vulnerabilities in parameter parsing in Action Pack by steveklabnik on Wednesday January 09, 2013 @06:57AM (#5031129)
It will be the default, yes.