diff options
author | Lance Stout <lancestout@gmail.com> | 2012-03-13 12:24:41 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-03-13 12:24:41 -0700 |
commit | 96ff2d43c057c1aabdb735f3a0150d3a99fb0db6 (patch) | |
tree | ae15d02a8fd52748f7d2a28fde5206c1eacf4659 /sleekxmpp/features/feature_mechanisms | |
parent | 1b00b7e8dfb4d4b0d069853493d7292d587d5cbe (diff) | |
download | slixmpp-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/features/feature_mechanisms')
-rw-r--r-- | sleekxmpp/features/feature_mechanisms/mechanisms.py | 3 |
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 |