about summary refs log tree commit diff
path: root/app/validators
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-07-26 21:22:43 +0200
committerThibaut Girka <thib@sitedethib.com>2018-07-26 21:22:43 +0200
commit6141c2a035fc8fe76b2b460aeeeeed59a1bd29f9 (patch)
tree5a522712adf913cfb9d426fe8798ae29ff9e2702 /app/validators
parent82ab5aacb24edf793f391cb4122116bf92ee0e7a (diff)
parent3c35b34b612c210c97ce8cffda33798ffa8f22e8 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/validators')
-rw-r--r--app/validators/email_mx_validator.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/validators/email_mx_validator.rb b/app/validators/email_mx_validator.rb
index e9e6b56e8..8d1e58b38 100644
--- a/app/validators/email_mx_validator.rb
+++ b/app/validators/email_mx_validator.rb
@@ -16,7 +16,7 @@ class EmailMxValidator < ActiveModel::Validator
     return true if domain.nil?
 
     records = Resolv::DNS.new.getresources(domain, Resolv::DNS::Resource::IN::MX).to_a.map { |e| e.exchange.to_s }
-    records = Resolv::DNS.new.getresources(domain, Resolv::DNS::Resource::IN::A).to_a.map { |e| e.exchange.to_s } if records.empty?
+    records = Resolv::DNS.new.getresources(domain, Resolv::DNS::Resource::IN::A).to_a.map { |e| e.address.to_s } if records.empty?
 
     records.empty? || on_blacklist?(records)
   end