mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 07:12:45 +08:00
SECURITY: Possible SQL injection.
This commit is contained in:
parent
ba3f7936a8
commit
cd5842d38b
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user