Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Ruby on Rails SQL Injection. Parent comment
When you pass nested query parameters such as "id[a]=b&id[c]=d", Rails will parse it as parameters :id => {'a' => 'b', 'c' => 'd'}
If you use where(:id => params[:id]) it will become where(:id => {'a' => 'b', 'c' => 'd'})
And when Rails convert that to SQL statement, something can be exploited (though it's not mentioned in the report).
There are no comments on this comment yet.
When you pass nested query parameters such as "id[a]=b&id[c]=d", Rails will parse it as parameters :id => {'a' => 'b', 'c' => 'd'}
If you use where(:id => params[:id]) it will become where(:id => {'a' => 'b', 'c' => 'd'})
And when Rails convert that to SQL statement, something can be exploited (though it's not mentioned in the report).