Project

General

Profile

Issue with PubSub when user subscribes with a full JID

Peter Rajcani
Added about 4 years ago

I found the following issue when user subscribes with a full JID:

  1. Signed in with 2 users that share the same bare JID:

test1@tigasetest.com/foo

test1@tigasetest.com/bar

  1. Subscribed with test1@tigasetest.com/foo to node pubsub_test using HTTP API:
<data>
  <node>pubsub_test</node>
  <jids>
    <value>test1@tigasetest.com/foo</value>
  </jids>
</data>
  1. Published a message to pubsub_test node:
<data>
  <node>pubsub_test</node>
  <item-id>item-001</item-id>
  <entry>
    <item-entry>
      <title>Test</title>
      <content>Pubsub test</content>
    </item-entry>
  </entry>
</data>

In the case above, I only expect the test1@tigasetest.com/foo receive the pubsubs notification, however both test1@tigasetest.com/foo and test1@tigasetest.com/bar receive the pubsub notification. Seems like the pubsusb notification is based on bare JID, not full JID, since both users receive the same notification:

<message from="pubsub@tigasetest.com" to="test1@tigasetest.com" id="4">
    <event xmlns="http://jabber.org/protocol/pubsub#event">
       <items node="pubsub_test">
         <item id="item-001">
            <item-entry>
               <title>Test</title>
               <content>Pubsub test</content>
            </item-entry>
         </item>
      </items>
   </event>
</message>

According to XMPP specs (XEP-0060, Sec 6.1.6), if a full JID is used to subscribe to a node, the service must treat users with the same bare JID but different full JID (as in the case above) as separate JIDs for the purpose of generating event notifications. (see http://xmpp.org/extensions/xep-0060.html#subscriber-subscribe-multi).

Can this be achieved in Tigase? Is there a configuration option to support this feature?


Replies (1)

(1)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 4 years ago

Right now there is no support for subscription of nodes using full jid, as internally Tigase PubSub replaces passed full jid of subscriber with bare jid and stores only bare jid. However it is possible that it might be changed in future.

    (1-1/1)