SECURITY: Possible SQL injection.

This commit is contained in:
Guo Xiang Tan 2016-07-18 15:35:12 +08:00
parent ba3f7936a8
commit cd5842d38b

View File

@ -56,7 +56,7 @@ class ScreenedIpAddress < ActiveRecord::Base
#
# http://www.postgresql.org/docs/9.1/static/datatype-net-types.html
# http://www.postgresql.org/docs/9.1/static/functions-net.html
find_by("'#{ip_address.to_s}' <<= ip_address")
find_by("? <<= ip_address", ip_address.to_s)
end
def self.should_block?(ip_address)