#1106 closed defect (fixed)

Can't send private messages to chatroom members whose name contain upper case

Reported by: anonymous Owned by: wilmer
Priority: normal Milestone:
Component: Jabber Version: 3.2
Keywords: patch Cc:
IRC client+version: Client-independent Operating System: Linux
OS version/distro:


I'm trying to write a private message to a friend in a chatroom and he's not receiving my messages, but I can receive theirs.

It seems that if the nick contains upper case the message is not sent.

The xml console shows the following if the nick contains upper case (note the "to" attribute):

TX: <message type="chat" to="Nick=room@…"><body>asd</body></message>

And if the nick is lower case:

TX: <message type="chat" to="room@…/nick"><body>asd</body></message>

Attachments (1)

normalize.patch (1.1 KB) - added by Juan Luis Boya <ntrrgc@…> at 2014-02-01T09:13:28Z.

Download all attachments as: .zip

Change History (6)

comment:1 Changed at 2014-01-29T20:48:52Z by anonymous

i have the same issue

Changed at 2014-02-01T09:13:28Z by Juan Luis Boya <ntrrgc@…>

Attachment: normalize.patch added


comment:2 Changed at 2014-02-01T09:13:49Z by Juan Luis Boya <ntrrgc@…>

It seems there is a problem with jabber_buddy_by_ext_jid. At the beginning of the function it calls jabber_normalize.

jabber_normalize is intended to return the canonical form of a JID, in which the node and the domain are lowercase but the case of the resource is preserved, as it's case sensitive. JIDs follow the syntax node@domain/resource, so it does the job searching for a slash / character and converting all characters before to lowercase. If it does not find a slash, it converts all characters to lowercase.

Note though jabber_buddy_by_ext_jid does not treat with real JIDs as understood in the XMPP protocol, but with adapted "ext JIDs" in the form resource=node@domain. Passing these ext JIDs to jabber_normalize function triggers conversion of all the string to lowercase, breaking the resource.

As chatroom members nicknames are encoded in the resource part, this bug effectively breaks private conversations with any partner whose nickname is not entirely lowercase.

Instead, I've created a new function jabber_normalize_ext to deal with "ext JIDs". It does a similar job to that of jabber_normalize, converting all characters after the equal sign = to lowercase and keeping the case of those before. This way the issue is solved.

comment:3 Changed at 2014-02-04T04:38:30Z by dx

Keywords: patch added

comment:4 Changed at 2015-01-06T08:53:37Z by giacomo.tenaglia@…

Hi, same problem here as reported on #1180. Is the patch already merged in the main tree? If so, which version?

comment:5 Changed at 2015-01-17T21:18:20Z by dx

Resolution: fixed
Status: newclosed

Fixed this as part of revision 1072, based on the patch from this ticket (thanks!), modified to improve utf8 support (which was a problem in jabber_normalize too, the patch just did things the same way)

Modify Ticket

as closed The owner will remain wilmer.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.