public class IQReplyFilter extends Object implements PacketFilter
Such a packet must have the same packet id and must be an IQ packet of type
RESULT or ERROR. Moreover, it is necessary to check
the from address to ignore forged replies.
We accept a from address if one of the following is true:
to address of the request.
to address of the request was empty and the
from address matches either the bare jid of the server or the
(bare or full jid) of the client.
to was our bare address and the from is empty.
For a discussion of the issues, see the thread "Spoofing of iq ids and misbehaving servers" from 2014-01 on the jdev@jabber.org mailing list and following discussion in February and March.
| Constructor and Description |
|---|
IQReplyFilter(IQ iqPacket,
XMPPConnection conn)
Filters for packets which are a valid reply to an IQ request.
|
public IQReplyFilter(IQ iqPacket, XMPPConnection conn)
Such a packet must have the same packet id and must be an IQ packet of type
RESULT or ERROR. Moreover, it is necessary to check
the from address to ignore forged replies.
We accept a from address if one of the following is true:
to address of the request.
to address of the request was empty and the
from address matches either the bare jid of the server or the
(bare or full jid) of the client.
to was our bare address and the from is empty.
For a discussion of the issues, see the thread "Spoofing of iq ids and misbehaving servers" from 2014-01 on the jdev@jabber.org mailing list and following discussion in February and March.
iqPacket - An IQ request. Filter for replies to this packet.public boolean accept(Packet packet)
PacketFilteraccept in interface PacketFilterpacket - the packet to test.