Skip to content
Snippets Groups Projects
Unverified Commit bfca58d1 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Fix encoding error when checking e-mail MX records (#11696)

parent 14996496
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment