Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2022-08-28 21:20:12 +0300
committerlovetox <philipp@hoerist.com>2022-08-28 21:21:28 +0300
commitf1305fc956c90cbf2b20d7e5b8fa4d339585d216 (patch)
treea247c6d67a6b7d12692ed85180dae9cbbe428395 /nbxmpp/client.py
parent18c408c07afc6df5dbd5de452066bace65ef9bcc (diff)
feat: Add support for Extensible SASL Profile (XEP-0388)
Diffstat (limited to 'nbxmpp/client.py')
-rw-r--r--nbxmpp/client.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/nbxmpp/client.py b/nbxmpp/client.py
index fbeda6c..d16a009 100644
--- a/nbxmpp/client.py
+++ b/nbxmpp/client.py
@@ -692,7 +692,10 @@ class Client(Observable):
elif self.state == StreamState.AUTH_SUCCESSFUL:
self._stream_authenticated = True
- self._start_stream()
+ if self._sasl.is_sasl2():
+ self.state = StreamState.WAIT_FOR_FEATURES
+ else:
+ self._start_stream()
elif self.state == StreamState.AUTH_FAILED:
self._disconnect_with_error(StreamError.SASL,
@@ -786,7 +789,7 @@ class Client(Observable):
self.state = StreamState.WAIT_FOR_TLS_PROCEED
def _start_auth(self, features):
- if not features.has_sasl():
+ if not features.has_sasl() and not features.has_sasl_2():
self._log.error('Server does not support SASL')
self._disconnect_with_error(StreamError.SASL,
'sasl-not-supported')