spf 0.0.37 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/spf/eval.rb +5 -4
- data/lib/spf/version.rb +1 -1
- data/spf.gemspec +1 -1
- metadata +1 -1
data/lib/spf/eval.rb
CHANGED
@@ -68,8 +68,9 @@ class SPF::Server
|
|
68
68
|
DEFAULT_MAX_NAME_LOOKUPS_PER_MX_MECH
|
69
69
|
@max_name_lookups_per_ptr_mech = options[:max_name_lookups_per_ptr_mech] ||
|
70
70
|
DEFAULT_MAX_NAME_LOOKUPS_PER_PTR_MECH
|
71
|
-
|
72
|
-
|
71
|
+
|
72
|
+
# TODO: We should probably do this for the above maximums (allow nil maximums).
|
73
|
+
@max_void_dns_lookups = options.has_key?(:max_void_dns_lookups) ? options[:max_void_dns_lookups] : DEFAULT_MAX_VOID_DNS_LOOKUPS
|
73
74
|
|
74
75
|
@raise_exceptions = options.has_key?(:raise_exceptions) ? options[:raise_exceptions] : true
|
75
76
|
|
@@ -127,7 +128,7 @@ class SPF::Server
|
|
127
128
|
end
|
128
129
|
end
|
129
130
|
|
130
|
-
def dns_lookup(domain, rr_type
|
131
|
+
def dns_lookup(domain, rr_type)
|
131
132
|
if SPF::MacroString === domain
|
132
133
|
domain = domain.expand
|
133
134
|
# Truncate overlong labels at 63 bytes (RFC 4408, 8.1/27)
|
@@ -142,7 +143,7 @@ class SPF::Server
|
|
142
143
|
|
143
144
|
packet = nil
|
144
145
|
begin
|
145
|
-
packet =
|
146
|
+
packet = @dns_resolver.getresources(domain, rr_type)
|
146
147
|
rescue Resolv::TimeoutError => e
|
147
148
|
raise SPF::DNSTimeoutError.new(
|
148
149
|
"Time-out on DNS '#{rr_type}' lookup of '#{domain}'")
|
data/lib/spf/version.rb
CHANGED
data/spf.gemspec
CHANGED