-
Notifications
You must be signed in to change notification settings - Fork 2
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
How are json params deserialized / secured? #109
Comments
Strong params isn't being used because it proved roughly impossible to get the
There is restriction of the approved status, but there does need to be a more general whitelist that will keep people from updating, like, |
Thank you for clarifying, I missed the use of the deserialize cmd in the transcriptions controller. It's good to see you've got this setup and I agree about a more specific whitelist of allowed attributes and not any model attribute. |
A good argument for keeping things like this inline, thanks for pointing it out. Looking at the code, I don't know if I'll need to bring strong params back and let the deserializer worry about it, or if I can just use the https://github.com/stas/jsonapi.rb/blob/master/lib/jsonapi/deserialization.rb#L31-L35 |
My understanding is that you can use the deserialization instead of strong params. |
I can't see the use of
jsonapi_deserialize
to ensure only whitelisted controller params are making it through to the model layer, https://github.com/stas/jsonapi.rb#deserializationAlso I can't see the controller layer using strong params to ensure only whitelisted attribtues are updated.
How do you ensure that only specific, allowed attributes are being updated at the model layer?
The text was updated successfully, but these errors were encountered: