Fixed
Details
Assignee
Guus der KinderenGuus der KinderenReporter
wrootwrootFix versions
Affects versions
Priority
Major
Details
Details
Assignee
Guus der Kinderen
Guus der KinderenReporter
wroot
wrootFix versions
Affects versions
Priority
Created June 22, 2009 at 2:43 PM
Updated October 28, 2020 at 1:26 PM
Resolved January 28, 2010 at 6:10 AM
If you send a subscription request (such as subscribe) to a member on another server:
<presence to="wolverine@jabbertest.com" type="subscribe" from="wolfman@jabbertest2.com/web"> <priority>0</priority> </presence>
If the other server is not available then OutgoingSessionPromise will send an error back to the sender.
(This is a very important step so the client knows that the subscription failed to send.)
The code that does this is in: OutgoingSessionPromise - returnErrorToSender
Presence reply = new Presence(); reply.setID(packet.getID()); reply.setTo(from); reply.setFrom(to); reply.setError(PacketError.Condition.remote_server_not_found); routingTable.routePacket(reply.getTo(), reply, true);
The code fragment above shows that the error is routed back again.
The problem is the line: reply.setTo(from);
The "from" no longer has the resource in it because it was stripped out earlier in PresenceSubscribeHandler process.
So an error gets generated in the routePacket function. A presence can't be routed to a bare JID and an error is generated in the WARN log:
org.jivesoftware.openfire.PacketException: Cannot route packet of type IQ or Presence to bare JID: <presence to="wolfman@jabbertest2.com" from="wolverine@jabbertest.com" type="error"> <error code="404" type="cancel"> <remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/> </error> </presence>
We really need that error sent back to the client.