lib/spf/model.rb in spf-0.0.10 vs lib/spf/model.rb in spf-0.0.11
- old
+ new
@@ -545,11 +545,11 @@
server.count_dns_interactive_term(request)
target_domain = self.domain(server, request)
mx_packet = server.dns_lookup(target_domain, 'MX')
- mx_rrs = (mx_packet.answer or server.count_void_dns_lookup(request))
+ mx_rrs = (mx_packet[0].answer or server.count_void_dns_lookup(request))
# Respect the MX mechanism lookups limit (RFC 4408, 5.4/3/4):
if server.max_name_lookups_per_mx_mech
mx_rrs = max_rrs[0, server.max_name_lookups_per_mx_mech]
end
@@ -800,9 +800,10 @@
term = self.parse_term
rescue SPF::Error => e
term.errors << e if term
@errors << e
raise if @raise_exceptions
+ return if SPF::JunkInRecordError === e
end
end
#self.parse_end
end