[jdev] Case sensitive & jid

Matthias Wimmer m at tthias.net
Fri May 7 09:28:58 CDT 2004


Hi Remy!

Remy HAREL schrieb am 2004-05-07 14:46:01:
>   Still in my project to make jabberd 2 an high availibility 
> application, I'm currently adding datas in xmpp packets. These datas are 
> MD5 hashed, and among these data there is the full_jid ( i.e. : 
> remy.harel at jabber.gicm.net/Gabber for example ).
> 
>    The main problem is to know which of the three parts of this 
> full_jid are case sensitive, because if case is ignored I could have two 
> differents md5 sums for the same full jid. If i'm not clear, the md5 
> sums for 'remy' and 'Remy' are differents. For a non sensitive case 
> application it would be the same person if we work on name but two 
> differents persons if we work on names'md5sums.

None of the parts are case-sensitive and non of them are
case-insensitive. You have to use different string-prep profiles to
check if two are the same.
Therefore to hash them you first have to normalize them using stringprep
with the nodeprep profile for the user part, the nameprep profile for
the domain part and the resourceprep profile for the resource part.


Tot kijk
    Matthias

-- 
Fon: +49-(0)70 0770 07770       http://matthias.wimmer.name/
HAM: DB1MW                      xmpp:mawis at charente.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://www.jabber.org/jdev/attachments/20040507/0bcc5c9b/attachment-0002.pgp>


More information about the JDev mailing list