Closed ghost closed 7 months ago
I have two objections to this PR:
I agree with @matsduf. The implementation is simpler if IDNs are normalized to A-labels internally. E.g. the cache layer needs to work with normalized domain names anyway.
Put on hold until specification has been updated (or at least proposal). An issue will be created in zonemaster/zonemaster.
Purpose
With the libidn2 migration and the IDNA2008 mappings, Zonemaster can't test a domain with a symbol if it is not given in its encoded form (try for instance with
š.example
andxn--yp8h.example
).Even though ICANN agreed that it is ok to prevent symbol mappings in IDNA2008, emoji domains exist (see for instance https://iā¤ļø.ws/). Therefore it would be nice if Zonemaster could automatically encode the domain and test it.
Context
n/a
Changes
Following recommendations in libidn2 manual, the
to_idn()
method is updated to be IDNA2003 compatible.How to test this PR
A unit test is added. This PR can also be manually tested,
perl -MZonemaster::LDNS -MEncode -e 'Zonemaster::LDNS::to_idn( decode_utf8( "š.tld" ) )'
sould not give any error.credits to @blacksponge for spotting this