diff options
author | Franck Zoccolo <franck@zoccolo.com> | 2019-02-12 14:48:04 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-02-12 14:48:04 +0100 |
commit | 4f0322dcae8d68feecff880eabfd7339082647d0 (patch) | |
tree | 32afc39d170d1ab47d1883d4cfac6dba6ad6f6af /app | |
parent | 241661e009a7f3a9a458b5494910f39bec5e88e4 (diff) |
Add support for IPv6 only MXes in Email validation (#10009)
* Add support for IPv6 only MXes * Fixed email validator tests
Diffstat (limited to 'app')
-rw-r--r-- | app/validators/email_mx_validator.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/validators/email_mx_validator.rb b/app/validators/email_mx_validator.rb index 5b4c684b2..96fbedcfc 100644 --- a/app/validators/email_mx_validator.rb +++ b/app/validators/email_mx_validator.rb @@ -24,6 +24,7 @@ class EmailMxValidator < ActiveModel::Validator ([domain] + hostnames).uniq.each do |hostname| ips.concat(dns.getresources(hostname, Resolv::DNS::Resource::IN::A).to_a.map { |e| e.address.to_s }) + ips.concat(dns.getresources(hostname, Resolv::DNS::Resource::IN::AAAA).to_a.map { |e| e.address.to_s }) end end |