Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protected_attributes allows all params and brakeman doesn't recognise the mass assignment concern #475

NikoRoberts opened this Issue Apr 24, 2014 · 2 comments


None yet
3 participants
Copy link

NikoRoberts commented Apr 24, 2014

Using the "protected_attributes" gem on a Rails 4 app, from what I can gather makes permit_all_attributes=true but brakeman doesn't recognise this and doesn't detect the mass assignment security concern.

So if whitelisting is off, protected_attributes gem is in the Gemfile and no attr_accessible are defined then params[:foo] can be mass assigned to the Model and Brakeman thinks that the permitted? will be tested because of Rails 4 but it isn't.

cc @guy-silva @bcoelh0


This comment has been minimized.

Copy link

presidentbeef commented Apr 24, 2014

Hi Niko,

Thank you for reporting this. I'll get it fixed up.

presidentbeef added a commit that referenced this issue Apr 26, 2014

Check for protected_attributes gem in Rails 4 apps
and treat mass assignment as if it is allowed instead
of using strong parameters.

Fixes #475

This comment has been minimized.

Copy link

phene commented May 8, 2014

This fix should have accounted for the Rails 3.x active_record.whitelist_attributes setting. #488

Repository owner locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.