diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-08-30 01:35:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-30 01:35:12 +0200 |
commit | bfca58d1371f8aa9840c9ca84bcc6de1503f863c (patch) | |
tree | bcf08b3759c280d876cdd5274343c6b7cd4f7a87 | |
parent | 14996496a58cdf5f4eaa25f05562f3548b33d10c (diff) |
Fix encoding error when checking e-mail MX records (#11696)
-rw-r--r-- | app/validators/email_mx_validator.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/validators/email_mx_validator.rb b/app/validators/email_mx_validator.rb index 96fbedcfc..9b5009966 100644 --- a/app/validators/email_mx_validator.rb +++ b/app/validators/email_mx_validator.rb @@ -14,6 +14,7 @@ class EmailMxValidator < ActiveModel::Validator return true if domain.nil? + domain = TagManager.instance.normalize_domain(domain) hostnames = [] ips = [] @@ -29,6 +30,8 @@ class EmailMxValidator < ActiveModel::Validator end ips.empty? || on_blacklist?(hostnames + ips) + rescue Addressable::URI::InvalidURIError + true end def on_blacklist?(values) |