Skip to content

Commit

Permalink
Merge pull request #14 from bigio/ascii-result
Browse files Browse the repository at this point in the history
SPF explanation text is restricted to 7-bit ascii
  • Loading branch information
marcbradshaw authored Aug 7, 2024
2 parents 954e0fc + 35e813d commit 6bc155e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Mail/SPF/Result.pm
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,10 @@ sub authority_explanation {
try {
# ... then try to expand it:
$authority_explanation = $authority_explanation_macrostring->expand;
# SPF explanation text is restricted to 7-bit ascii
if(defined $authority_explanation and utf8::is_utf8($authority_explanation)) {
$authority_explanation = $server->default_authority_explanation->new(request => $request)->expand;
}
}
catch Mail::SPF::EInvalidMacroString with {};
# Ignore expansion errors and leave authority explanation undefined.
Expand Down

0 comments on commit 6bc155e

Please sign in to comment.