Fix SPF record selection to prefer highest version regardless of DNS order - #38
Open
Munrok wants to merge 2 commits into
Open
Fix SPF record selection to prefer highest version regardless of DNS order#38Munrok wants to merge 2 commits into
Munrok wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ail::SPF::Server::select_record() currently determines the preferred
record class from $records[0]. This makes record selection depend on
the order of resource records returned by DNS.
When both a v=spf1 record and an applicable spf2.0/mfrom record are
present, reversing their DNS RR order can therefore change the result.
select_record() already documents that records of the highest
acceptable version should be selected. This change determines the
preferred class from the requested versions instead of from the first
DNS record.
A regression test has also been added with the v=spf1 record appearing
before the spf2.0/mfrom record.
This keeps the existing Sender ID support deterministic without
otherwise changing its behavior.