summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-03-13 12:24:41 -0700
committerLance Stout <lancestout@gmail.com>2012-03-13 12:24:41 -0700
commit96ff2d43c057c1aabdb735f3a0150d3a99fb0db6 (patch)
treeae15d02a8fd52748f7d2a28fde5206c1eacf4659 /sleekxmpp
parent1b00b7e8dfb4d4b0d069853493d7292d587d5cbe (diff)
downloadslixmpp-96ff2d43c057c1aabdb735f3a0150d3a99fb0db6.tar.gz
slixmpp-96ff2d43c057c1aabdb735f3a0150d3a99fb0db6.tar.bz2
slixmpp-96ff2d43c057c1aabdb735f3a0150d3a99fb0db6.tar.xz
slixmpp-96ff2d43c057c1aabdb735f3a0150d3a99fb0db6.zip
Explicitly set the desired SASL mech to ANONYMOUS if no username is provided.
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/features/feature_mechanisms/mechanisms.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sleekxmpp/features/feature_mechanisms/mechanisms.py b/sleekxmpp/features/feature_mechanisms/mechanisms.py
index 3818c70e..6f01cb14 100644
--- a/sleekxmpp/features/feature_mechanisms/mechanisms.py
+++ b/sleekxmpp/features/feature_mechanisms/mechanisms.py
@@ -32,6 +32,9 @@ class FeatureMechanisms(BasePlugin):
def plugin_init(self):
self.use_mech = self.config.get('use_mech', None)
+ if not self.use_mech and not self.xmpp.boundjid.user:
+ self.use_mech = 'ANONYMOUS'
+
def tls_active():
return 'starttls' in self.xmpp.features