mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:11:08 +08:00
FIX: match subdomain with email domain blacklist
This commit is contained in:
@ -17,7 +17,7 @@ class EmailValidator < ActiveModel::EachValidator
|
||||
|
||||
def email_in_restriction_setting?(setting, value)
|
||||
domains = setting.gsub('.', '\.')
|
||||
regexp = Regexp.new("@(#{domains})", true)
|
||||
regexp = Regexp.new("@(.+\.)?(#{domains})", true)
|
||||
value =~ regexp
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user