From: | Shannon -jj B. |
Sent on: | Monday, July 27, 2009, 10:11 PM |
Hi, I'm a bit of a Rails newbie, but I have a question about security. I have a User model and a Role model. Users habtm roles. I setup a multiple select box for a user to configure his roles. (Actually, I setup a multiple select box for an admin user to configure other users' roles.) Without any work in the controller, the user can configure role_ids. Hence, by default, if you can edit a user, you can edit his role_ids for free. That worries me. Does that mean anytime a user is editing ModelA that habtm ModelB, then the user can hack his form to automatically edit all the modelb_ids? Should I be worried? Is this a class of vulnerabilities common to naive Rails apps? Am I making sense? Thanks, -jj -- In this life we cannot do great things. We can only do small things with great love. -- Mother Teresa https://jjinux.blo...
Meetup members, Log in
By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy