News for hackers. Stuff that matters.
Re:GitHub Enterprise SQL Injection by true_religion on Sunday January 08, 2017 @06:38AM (#13349303)
Django for example will throw an error if an ordering parameter does not correspond to a database column.

If you have to specify all the columns of a table in Rails, then ActiveRecord ought to be able to restrict the order params to only column names.

Re:GitHub Enterprise SQL Injection by smithd98 on Sunday January 08, 2017 @08:09AM (#13349552)
I imagine some ORMs don't have this so people can do order by computed columns like "order by assets - liabilities"

To your point it probably makes sense to have an order method that verifies column names and an order_raw method that takes a string so the caller understands the risk, while protecting the usual case.