https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6959

--- Comment #4 from Mark Martinec <[email protected]> ---
I'm partly retracting my statement: we do get back from Net::DNS
in a question section an utf8 flagged string (despite us supplying
plain bytes). The resulting string is not actually invalid, it is
encoded as ascii in RFC 1035 zone format encoding, so it is
quite unnecessarily flagged as utf8. An invalid character string
is formed when we try to decode the RFC 1035 zone format encoding
while keeping the utf8 flag unchanged.

The cleanest fix would be for Net::DNS not to gratuitously turn
on the utf8 flag on RFC 1035 zone format encoded strings.
A fix/workaround on our side is to decode a returned character
string to bytes before doing the RFC 1035 zone format decoding
on them. ...

... (not to mention a wish/ramble that Net::DNS should start offering
an 8-bit clean API instead of requiring an application to decode/encode
domain names in a format intended for zone file editing. After all,
Perl as well as the DNS system are both 8-bit clean and allow arbitrary
bytes (including nulls) in labels and results)

The solution sounds like a simple call to Encoder::encode, although
that routine (and Encode::is_utf8 and Encode::_utf8_off) have a long
history of misbehaving on various versions of Perl, especially
when dealing with tainted strings.

Working on it...

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to