Lookup for reserved LDH labels

Andrew Sullivan ajs at anvilwalrusden.com
Wed Nov 7 14:31:56 CET 2012

On Wed, Nov 07, 2012 at 09:51:05AM +0100, Simon Josefsson wrote:

> The problem is that any implementation that takes an all-ASCII string
> (like "foo" or "ad-acta") and follows the steps in section 5 of RFC 5891
> will (if the string is permitted for lookup) end up in a punycode
> encoded string.  For example, the input "foo" will be converted into
> "xn--foo-".

I don't believe this is true.  You're only supposed to do the
processing on A-labels (or putative A-labels).  Your examples are just
LDH-labels, and they shouldn't get processed.  I agree, however, that
the procedure in RFC 5891 appears not to say, "If it's an LDH-label,
it is passed through."  That's probably because of the statement in
section 3.2, which I suspect was intended to restrict the scope of the
protocol to IDNs, leaving everything else out.  Unfortunately, it
doesn't actually exclude NR-LDH labels from processing under the protocol.

> To avoid this problem, I suspect implementers typically check whether
> the input is all ascii before proceeding with the section 5 stuff.  This
> has a side effect that your string will be permitted.

It might be that they're checking for "all ASCII", but that's probably
not quite right.  They should be checking for NR-LDH or Non-LDH, I
guess, and making a decision on that basis.

I'm not too keen on your proposed text.  What about instead, in 5.1,
the following:

    If the string is an NR-LDH label, it proceeds directly to DNS Name
    Resolution (see Section 5.6).


Andrew Sullivan
ajs at anvilwalrusden.com

More information about the Idna-update mailing list