Skip to content

Commit

Permalink
SPF explanation text is restricted to 7-bit ascii
Browse files Browse the repository at this point in the history
  • Loading branch information
bigio committed Jun 19, 2024
1 parent 966cff2 commit 35e813d
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 35e813d

Please sign in to comment.