Joining MUC Room without "from" attribute?


During debugging we have found out that our Smack-based client does not send the “from” attribute when joining a chatroom:

<presence xmlns="jabber:client" id="oFLI8-4"    to="test@conference.localhost/admin">
  <x xmlns=""/>

It works fine with OF. However, this seems to be not compliant with xep-0045 ( 7.1.2 Basic MUC Protocol)

  <x xmlns=''/>

Is this a bug in OF and Smack that could eventually cause issues when connecting to non-Openfire servers?

An explanation of why the “from” field is not supported can be found in the following two threads:

“Hi Trung,

I expect (without checking the source) that spoofing the from address is not allowed within Smack. Even if it is possible Wildfire should drop such messages.

It could help to write a Wildfire Plugin instead of using Smack.


“Hey Dmitry,

*AFAIK, what you are trying to do is not allowed by the XMPP spec. The XMPP is very strict in the security area and does not allow to spoof the sender of a message. Otherwise, XMPP servers would be nice targets for spamming. *

So even if you manage to change the sender of the message from Smack you will depend on the server that you are using to not rectify that information.


  • – Gato”*

A possible fix has been found here:

MUCRoom room = mucService.getChatRoom(roomName);
JID userjid = new JID(userName, server, "Server");
MultiUserChatService mucService = mucManager.getMultiUserChatServices().get(0);
               Message cheat = new Message();

Could one of the developers shed some light on this?