News for hackers. Stuff that matters.
Re:Bobby Tables by pmontra on Sunday December 03, 2017 @04:03PM (#15839582)
The unsafe Rails code accepts a string as argument and copies it as is into the SQL code. The safe statement accepts a map and transforms it into SQL code using all the safety features made available by the underlying database driver. It's what your helper function seems to do.

A solution would be banning any string argument, maybe except the inevitable one for fin_by_sql.

The post probably argues for databases exposing directly their inner API. Let's suppose there is a standard. I bet that there would be still ways to write vulnerable code.

There are no comments on this comment yet.