JID case sensitivity

Peter Saint-Andre stpeter at stpeter.im
Fri Mar 27 01:49:38 UTC 2009

On 3/26/09 7:44 PM, Martin Atkins wrote:
> Peter Saint-Andre wrote:
>> Correct. That might change slightly in rfc3920bis (probably by ripping
>> out the dependency on stringprep because it is tied to Unicode 3.2 and
>> has all those long, scary character tables), but in a way that will be
>> as backwards-compatible as possible.
> I would love to see the XMPP spec define the JID syntax without
> referring to stringprep. I find it incredibly difficult to understand
> definitively what the requirements are.

Most people do, which is why we're going to fix it.

> So, to summarize:
> * The node (before the @) and domain should be case-insensitive.
> * The resource should be case-sensitive.

With the caveat that the concept of case sensitivity applies only to
US-ASCII characters and not the rest of the Unicode characters, yes.

> So when DJabberd parses a JID, it ought to normalize the case in the
> node and domain parts. It must presumably do this in a way defined in
> stringprep rather than relying on Perl's in-built ability to turn
> strings to lowercase.

Does Perl's in-built ability apply to US-ASCII only or also to any
Unicode character (e.g., normalizing ∏ to π or whatever)?

> Is this correct? (and does anyone want to send in a patch? :) )

Sorry, my Perl is awfully rusty. :|


Peter Saint-Andre

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6751 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.danga.com/pipermail/djabberd/attachments/20090326/6f7efed9/smime.bin 

More information about the Djabberd mailing list