[Pidgin] #4187: Doesnt cope with bonjour contacts having multiple presence records
Pidgin
trac at pidgin.im
Tue Dec 4 05:00:52 EST 2007
#4187: Doesnt cope with bonjour contacts having multiple presence records
----------------------+-----------------------------------------------------
Reporter: sjoerd | Owner: datallah
Type: defect | Status: new
Priority: minor | Milestone:
Component: Bonjour | Version: 2.3.0
Resolution: | Keywords:
Pending: 0 |
----------------------+-----------------------------------------------------
Comment (by sjoerd):
You have to use both the ip address and the from attribute.
Some implementations don't correctly set the from (For example iChat and
older versions of
Adium ), so in those cases you must use the ip to figure out who is
talking to you by the ip address
But that obviously if there are multiple contacts on one ip this doesn't
work. So in those cases you will need to use the from attributes to figure
out who is talking to you. Some implementations don't set the from on
stream opening unfortunately, which means you might have to wait for the
first stanza..
Salut copes with this as following. All _presence._tcp service are
resolved. Services with the same service name are assumed to belong to the
same contact. So one contact can have multiple services backing it and we
use the service that was last updated for the contacts presence info and
other properties. There are potential race conditions in this, but it's
reasonable to assume that a contact will update all its services to the
same info eventually.
In telepathy-salut the following steps are taken when there is an incoming
connections.
0) Look at the connections IP if no contacts have a presence on that ip
ignore it (drop the
connection). If there are one of more contacts, continue
1) Wait for the stream opening if there is a from and it matches one of
the contacts on the IP
assign that connection to that contact. If it doesn't match any of
the contacts on the IP,
ignore it. If there is no from continue
2) Wait for the first stanza after the stream opening (skipping
<stream:features /> if needed).
If that stanza has a from and it matches a contact on the IP, then
assign it. If it doesn't
match any drop it. If there is no from and there is exactly one
contact on the IP
then assume it belongs to that contact.
Doing it this way makes sure we have validated the contact if possible,
while still coping with clients that don't follow the latest XEP revision.
After a connection has been assigned to a contact we don't really use the
from anymore, but assume all message come from the assigned contact (to
prevent spoofing).. A futher addition might be to validate the from on
each stanza and drop the connection when the remote end tries spoofing
--
Ticket URL: <http://developer.pidgin.im/ticket/4187#comment:2>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list