mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
SECURITY: Possible SQL injection.
This commit is contained in:
@@ -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/datatype-net-types.html
|
||||||
# http://www.postgresql.org/docs/9.1/static/functions-net.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
|
end
|
||||||
|
|
||||||
def self.should_block?(ip_address)
|
def self.should_block?(ip_address)
|
||||||
|
|||||||
Reference in New Issue
Block a user