-
The issue is actually a little more complex. According to XEP-0030 it is possible to query any item returned by
disco#items
, so client may query withdisco#info
items returned by PubSub node.However, XEP-0030 provides a way to limit queries (to inform client that query for info of a PubSub node item is not supported) by adding to the PubSub node
disco#info
response<identity category='hierarchy' type='leaf'/>
which mean that this disco item is may not contain any more subitems (just entries which are not queryable).The solution here is to add to PubSub support for identity of category
hierarchy
and to add proper support for that to the clients.@bmalkow I think this will solve your issue which you have seen in BeagleIM when it was possible to expand items which would list all PubSub nodes leading to the infinite loop of nodes and items.
-
@andrzej.wojcik after our discussion (and your example about running a query against main server domain) it occurred to me that we may review our handling of discovery and add those identities in all relevant places (if missing) and not only in pubsub.
And one more comment - we do currently already send
<identity type='leaf' category='pubsub'/>
in pubsub, which informs the client that returned<item/>
s should not be queried further, however adding category defined in xep-0030 will make it even more compatible (with clients that may not understand pubsub semantics defined in xep-0060) -
AFAIR the idea was to add (as mentioned in https://xmpp.org/extensions/xep-0030.html#items-hierarchy) category identity for collections and leafs:
<identity category='hierarchy' type='branch'/>
and<identity category='hierarchy' type='leaf'/>
respectively, to make clients unaware of pubsub semantics also being able to handle those cases correctly.I'm not sure if there are other places that may require it (MUC comes to mind, but AFAIR Bartosz made some fixes a while back and most likely it's handled correctly, but checking it out wouldn't hurt)
Type |
Bug
|
Priority |
Normal
|
Assignee | |
Version |
tigase-server-8.2.0
|
Spent time |
0
|
There is nothing more inside PubSub node item, so it should not return
disco#items
as a supported feature. Currently, as it is returned, clients think that they should query subitems and as PubSub node item has nonode
attribute in disco result are quering PubSub component nodes once again.