Granting room membership for email username

Hi all,

First of all excuse me for my bad English, I hope you can understand what I mean. I have been searching information about this and I had no success so I decided to register and ask you. I don’t even know if this is the correct place for my question.

I am testing an Openfire 3.8.2 server which is supposed to keep some private (members only) rooms. Users will register with its email address as username, so a complete JID (without escaping and inside a chat room) will be, for example, “user1@gmail.com*@openfire.domain\gajim*”. We don’t have any problem when registering usernames from admin console, we can enter “user1@gmail.com” and Openfire will escape it and store “user1\40gmail.com”.

Our problem appears when we try to grant membership from admin console. An exception is thrown when adding “user1@gmail.com*@openfire.domain*” as room member. It says it’s not a valid JID, which is obvious, but should Openfire escape the full JID before trying to grant membership? I thought it would behave just as registering users. Entering escaped JID (“user1\40gmail.com@openfire.domain”) in webpage has no effect as user isn’t validated as member when trying to enter the room. Checking Openfire’s database we can see that escaped JID has been stored as “user1\5c40gmail.com@openfire.domain”, so it has been ‘re-escaped’. Apparently there’s no way to grant membership for an email username from admin console.

However, SMACK allows us to grant membership by escaping the node. This way everything works fine as members can enter the room and admin console shows “user1@gmail.com*@openfire.domain*” in room’s user list.

So the question is: are we doing something wrong or admin console should escape JID before granting membership?

Thanks in advance.

Your English is fine (at least for me, non-native English speaker).

As you say, that you can insert usernames with email address into room members via Smack and they show up correctly i think this may be a bug in this form (adding users to room membership). I’m not a developer though. But if it accepts it via Smack and shows correctly, it should be accepting it via form also. OF-721

Thanks wroot. I must say that we escaped the node part of the JID before invoking grantMembership from SMACK. Nevertheless I think there is no way to grant membership for an email username from console. But I can be wrong since I am an Openfire newbie.