Browse Source

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

pull/4/head
Eugen Rochko 4 years ago
committed by GitHub
parent
commit
bfca58d137
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      app/validators/email_mx_validator.rb

+ 3
- 0
app/validators/email_mx_validator.rb View File

@ -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)

Loading…
Cancel
Save