[Standards] IDN Names and NodePrep

Peter Saint-Andre stpeter at jabber.org
Mon Jul 2 22:54:02 UTC 2007

Chris Mullins wrote:
> This is probably a silly question, but it's been giving me a hard time
> for a bit now.
> Is "!.com" (without the quotes) a valid JID? 
> The definition of a JID is: 
>        A domain identifier MUST be an "internationalized domain name" 
>        as defined in [IDNA], to which the Nameprep [NAMEPREP] 
>        profile of stringprep [STRINGPREP] can be applied
>        without failing. 
>>From this definition, "!.com" passes all the rules. 
> None of the prohibited tables list "!" in them anywhere (or " " <space>)
> as far as I can tell. 
> IDNA does talks about LDH characters (which would means a "!" is
> invalid), and it talks about them in the context of having a
> UseSTD3ASCIIRules flag. I can't determine if I should be using this or
> not. 

draft-saintandre-rfc3920bis says:

   A domain identifier MUST be an "internationalized domain name" as
   defined in [IDNA], that is, "a domain name in which every label is an
   internationalized label".  When preparing a text label (consisting of
   a sequence of Unicode code points) for representation as an
   internationalized label in the process of constructing an XMPP domain
   identifier or comparing two XMPP domain identifiers, an application
   MUST ensure that for each text label it is possible to apply without
   failing the ToASCII operation specified in [IDNA] with the
   UseSTD3ASCIIRules flag set (thus forbidding ASCII code points other
   than letters, digits, and hyphens).  If the ToASCII operation can be
   applied without failing, then the label is an internationalized
   label.  An internationalized domain name (and therefore an XMPP
   domain identifier) is constructed from its constituent
   internationalized labels by following the rules specified in [IDNA].
   (Note: The ToASCII operation includes application of the [NAMEPREP]
   profile of [STRINGPREP] and encoding using the algorithm specified in
   [PUNYCODE]; for details, see [IDNA].)

> Common sense says "yes" we should require this flag, but the more I read
> the spec, the more I think, "no". Specifically the phrase (from RFC
> 3490):
>        An "internationalized label" is a label to which the ToASCII 
>        operation (see section 4) can be applied without failing 
>        (with the UseSTD3ASCIIRules flag unset).
> Can any of the IDNA / Unicode guru's on this list help me answer this?

RTFM did the trick this time. Do you think I write these specs for the
fun of it? ;-)


Peter Saint-Andre
XMPP Standards Foundation

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7358 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.jabber.org/pipermail/standards/attachments/20070702/86b67f34/attachment.bin>

More information about the Standards mailing list