spf 0.0.23 → 0.0.24
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/spf/error.rb +7 -1
- data/lib/spf/eval.rb +2 -2
- data/lib/spf/version.rb +1 -1
- data/spf.gemspec +1 -1
- metadata +1 -1
data/lib/spf/error.rb
CHANGED
@@ -16,7 +16,13 @@ module SPF
|
|
16
16
|
class DNSTimeoutError < DNSError; end # DNS timeout
|
17
17
|
class RecordSelectionError < Error; end # Record selection error
|
18
18
|
class NoAcceptableRecordError < RecordSelectionError; end # No acceptable record found
|
19
|
-
class RedundantAcceptableRecordsError < RecordSelectionError
|
19
|
+
class RedundantAcceptableRecordsError < RecordSelectionError # Redundant acceptable records found
|
20
|
+
attr_accessor :records
|
21
|
+
def initialize(message, records=[])
|
22
|
+
@records = records
|
23
|
+
super(message)
|
24
|
+
end
|
25
|
+
end
|
20
26
|
class NoUnparsedTextError < Error; end # No unparsed text available
|
21
27
|
class UnexpectedTermObjectError < Error; end # Unexpected term object encountered
|
22
28
|
class ProcessingLimitExceededError < Error; end # Processing limit exceeded
|
data/lib/spf/eval.rb
CHANGED
@@ -229,7 +229,8 @@ class SPF::Server
|
|
229
229
|
if records.length != 1
|
230
230
|
# RFC 4408, 4.5/6
|
231
231
|
raise SPF::RedundantAcceptableRecordsError.new(
|
232
|
-
"Redundant applicable '#{preferred_record_class.version_tag}' sender policies found"
|
232
|
+
"Redundant applicable '#{preferred_record_class.version_tag}' sender policies found",
|
233
|
+
records
|
233
234
|
)
|
234
235
|
end
|
235
236
|
|
@@ -263,7 +264,6 @@ class SPF::Server
|
|
263
264
|
# Record covers requested scope.
|
264
265
|
records << record
|
265
266
|
end
|
266
|
-
break
|
267
267
|
end
|
268
268
|
end
|
269
269
|
return records
|
data/lib/spf/version.rb
CHANGED
data/spf.gemspec
CHANGED