Roster requests to bare JID of the user are not responded

Description

If I include a 'to' attribute in a roster request, which is the bare JID of the connected resource, like:

<iq id="1" to="user@domain" type="get"> <query xmlns="jabber:iq:roster"/> </iq>

I don't get a response. According to RFC 6120 the server should treat that as if there weren't a 'to' attribute, right?

This is due to this code in IQRosterHandler.java, which returns null:

IQ returnPacket = null; org.xmpp.packet.Roster roster = (org.xmpp.packet.Roster)packet; JID recipientJID = packet.getTo(); // The packet is bound for the server and must be roster management if (recipientJID == null || recipientJID.getNode() == null || !UserManager.getInstance().isRegisteredUser(recipientJID.getNode())) { returnPacket = manageRoster(roster); } // The packet must be a roster removal from a foreign domain user. else { removeRosterItem(roster); } return returnPacket;

I also don't understand the comment and the else part.

Environment

None

Activity

Show:

Neustradamus February 22, 2015 at 11:14 AM

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created February 2, 2015 at 10:16 PM
Updated February 22, 2015 at 11:14 AM
Resolved February 5, 2015 at 10:35 PM

Flag notifications