Commit a55e3eca authored by IKEDA Soji's avatar IKEDA Soji
Browse files

X-Original-DMARC-Record header field may break message (#1113)

parent e1555fc1
......@@ -3413,7 +3413,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