Case sensativility in JIDs

It seems like JIDs are case sensative in Ejabberd, correct? When I use ejabberd_xmlrpc to add users to rosters (both shared and normal), if the case isn't exactly the same it will add multiple users, and they are all displayed in the client as part of the group. Also, when I modify a shared roster through the web interface, it forces lower case. Entering a Member JID with any capital letters will result in it being saved as lower case, which implies to me that Ejabberd should handle case insensitive lookups of JIDs.

Additionally, if I create a shared roster and add myself as "barhorn" into the group, when I log in as "Barhorn" and download the roster I still see "barhorn" in the group, even though it did give me the right shared roster, ie it doesn't remove me from the list.

Is this the expected behavior? If needed, I can force the addition of users into groups to be lower case, but I cannot control how users log in from an external client (ie Pidgin). Some of my users use camel case for their IDs, and I'd like to keep that case displayed if possible.

barhorn wrote: It seems like

barhorn wrote:

It seems like JIDs are case sensative in Ejabberd, correct?

No. In XMPP, and in ejabberd, JIDs must be case insensitive.

barhorn wrote:

Also, when I modify a shared roster through the web interface, it forces lower case. Entering a Member JID with any capital letters will result in it being saved as lower case, which implies to me that Ejabberd should handle case insensitive lookups of JIDs.

Additionally, if I create a shared roster and add myself as "barhorn" into the group, when I log in as "Barhorn" and download the roster I still see "barhorn" in the group, even though it did give me the right shared roster, ie it doesn't remove me from the list.

Right.

barhorn wrote:

When I use ejabberd_xmlrpc to add users to rosters (both shared and normal), if the case isn't exactly the same it will add multiple users, and they are all displayed in the client as part of the group.

One problem here is that the command add_rosteritem (and others related) modify directly the Mnesia database without preparing the JIDs that the admin provides. So, that command MAY insert capital letters in the database, but it should not.

And the second part of the problem is that you provide JIDs in that command that use capital letters.

barhorn wrote:

If needed, I can force the addition of users into groups to be lower case, but I cannot control how users log in from an external client (ie Pidgin). Some of my users use camel case for their IDs, and I'd like to keep that case displayed if possible.

If you ensure that the JIDs provided in the command calls are lowercase, then you won't have any problem.

Syndicate content