Bug 18309

Summary: Salut should wait before denying a connection from an untrusted source
Product: Telepathy Reporter: Alban Crequy <alban.crequy>
Component: salutAssignee: Sjoerd Simons <sjoerd>
Status: RESOLVED MOVED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: guillaume.desmottes
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Alban Crequy 2008-10-30 09:58:32 UTC
When Salut goes online and starts a connection as soon as it is aware of the presence of a contact, this contact may not yet be aware of the initiator's presence. With the current code, the recipient will close the connection:

src/salut-xmpp-connection-manager.c new_connection_cb():

  contacts = salut_contact_manager_find_contacts_by_address (
      priv->contact_manager, addr);
  if (contacts == NULL)
    {
      DEBUG ("Couldn't find a contact for the incoming connection");
      gibber_transport_disconnect (connection->transport);
      return;
    }

Salut should wait a slack time in order to see whether the incoming connection from the untrusted source suddenly becomes a trusted source after some messages from Avahi.

This race usually does not happen with a regular UI because a human user is too slow to connect and start to chat immediately. But it can happen with bots, or scripts like telepathy-python/examples/tube-stream-private.py

This race exists because the incoming connection and the presence from the initiator to the recipient takes 2 different paths: a tcp connection and a DNS record in Avahi.

Note that this race is not a bug in the Telepathy client. It is a different problem than the "Telepathy client not waiting the contact to be ready to create a channel" bug.
Comment 1 GitLab Migration User 2019-12-03 19:39:11 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-salut/issues/11.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.