Unverified Commit 18bd4e0d authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #1135 from ikedas/issue-1113 by ikedas

X-Original-DMARC-Record header field may break message (#1113)
parents a95b7c95 a55e3eca
......@@ -3421,7 +3421,13 @@ sub _check_dmarc_rr {
# Note: txtdata() of Net::DNS::RR::TXT >=0.69 returns array of
# text fragments in array context. Take care to get values in
# scalar context.
my $rrstr = $_->txtdata if $_->type eq 'TXT';
# Additionally, it returns Unicode value ("utf8 flag" on).
my $rrstr;
if ($_->type eq 'TXT') {
$rrstr = $_->txtdata;
$rrstr = Encode::encode_utf8($rrstr)
if Encode::is_utf8($rrstr);
}
$rrstr;
} $packet->answer;
last if $rrstr;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment