This project is archived and is in readonly mode.
Rails 3 has_many through forces developer to make *_id attributes unprotected
-
Dan Pickett
- Tag changed from activerecord rails3 has_many through mass-assignment security attr_accessible to attr_accessible, has_many_through_association, rails3
- State changed from new to open
- Assigned user set to Dan Pickett
- Importance changed from to Low
based on my reading of the code on edge in has_many_through association it is performing a direct assignment on both ends of the relationship and the assignment should be unaffected by attr security.
Can you provide a failing test case for this, Pawel?
-
Pawel
I was testing this only on 3.0.5.
From reading the edge source code it appears to be fixed, so the bug could be closed now. -
Dan Pickett
- State changed from open to resolved
-
dmitry zhelnin
The issue is still unresolved in 3.0.6
-
Dan Pickett
Dmitry,
Could you provide a failing test case? I'd be happy to look into it.
Thanks,
Dan -
dmitry zhelnin
Yes, this test case fails for me:
https://github.com/whitered/mass_assignment_protection/blob/master/...