Ensure that auth is done based on the original, requested JID and not on the bound JID.

This commit is contained in:
Lance Stout
2012-08-17 10:17:35 -07:00
parent f0e1fc5aad
commit 8a03bd72ae
2 changed files with 10 additions and 5 deletions

View File

@@ -68,7 +68,12 @@ class BaseXMPP(XMLStream):
#: An identifier for the stream as given by the server.
self.stream_id = None
#: The JabberID (JID) used by this connection.
#: The JabberID (JID) requested for this connection.
self.requested_jid = JID(jid)
#: The JabberID (JID) used by this connection,
#: as set after session binding. This may even be a
#: different bare JID than what was requested.
self.boundjid = JID(jid)
self._expected_server_name = self.boundjid.host