From bfca58d1371f8aa9840c9ca84bcc6de1503f863c Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 30 Aug 2019 01:35:12 +0200 Subject: Fix encoding error when checking e-mail MX records (#11696) --- app/validators/email_mx_validator.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app') 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) -- cgit