mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: incorrect logic in email blocker
if mail.com was blocked, email.com was automatically blocked
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