Does Rails automatically protect against vulnerabilities of doing something like:
Given a URL: http://a.com/?id=3131313131313
then in the rails controller
@comment = Comment.find(params[:id])
Does Rails auto protect that, or do I need to do some type of validation to protect the app from hackers?
Thanks
ActiveRecord find will always use
.to_ito prevent all SQL injection magic.Rails will also auto-escape stuff in queries like this:
But not in