diff options
author | Nathan Fritz <fritzy@netflint.net> | 2009-09-25 17:35:10 +0000 |
---|---|---|
committer | Nathan Fritz <fritzy@netflint.net> | 2009-09-25 17:35:10 +0000 |
commit | 2349f849e3fd146d44af7d6e8714100657cf38da (patch) | |
tree | 24f3f995f08c369305184fc972f3ffa27b018f41 /sleekxmpp/__init__.py | |
parent | e59d43ff3e07610b9cedbd04f64619fe9743694d (diff) | |
download | slixmpp-2349f849e3fd146d44af7d6e8714100657cf38da.tar.gz slixmpp-2349f849e3fd146d44af7d6e8714100657cf38da.tar.bz2 slixmpp-2349f849e3fd146d44af7d6e8714100657cf38da.tar.xz slixmpp-2349f849e3fd146d44af7d6e8714100657cf38da.zip |
bugfixes
Diffstat (limited to 'sleekxmpp/__init__.py')
-rw-r--r-- | sleekxmpp/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sleekxmpp/__init__.py b/sleekxmpp/__init__.py index 6b4af9b6..f95c6665 100644 --- a/sleekxmpp/__init__.py +++ b/sleekxmpp/__init__.py @@ -181,6 +181,7 @@ class ClientXMPP(basexmpp, XMLStream): self.send(self.makeIqGet('jabber:iq:roster')) def _handleStreamFeatures(self, features): + self.features = [] for sub in features.xml: self.features.append(sub.tag) for subelement in features.xml: @@ -191,7 +192,7 @@ class ClientXMPP(basexmpp, XMLStream): return True def handler_starttls(self, xml): - if self.ssl_support: + if not self.authenticated and self.ssl_support: self.add_handler("<proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls' />", self.handler_tls_start, instream=True) self.send(xml) return True @@ -205,6 +206,8 @@ class ClientXMPP(basexmpp, XMLStream): raise RestartStream() def handler_sasl_auth(self, xml): + if '{urn:ietf:params:xml:ns:xmpp-tls}starttls' in self.features: + return False logging.debug("Starting SASL Auth") self.add_handler("<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl' />", self.handler_auth_success, instream=True) self.add_handler("<failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl' />", self.handler_auth_fail, instream=True) |