mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: incorrect logic in email blocker
if mail.com was blocked, email.com was automatically blocked
This commit is contained in:
parent
04288c14ff
commit
69ad0358c2
2 changed files with 20 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue