Explicitly set the desired SASL mech to ANONYMOUS if no username is provided.

This commit is contained in:
Lance Stout 2012-03-13 12:24:41 -07:00
parent 1b00b7e8df
commit 96ff2d43c0

View file

@ -32,6 +32,9 @@ class FeatureMechanisms(BasePlugin):
def plugin_init(self): def plugin_init(self):
self.use_mech = self.config.get('use_mech', None) 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(): def tls_active():
return 'starttls' in self.xmpp.features return 'starttls' in self.xmpp.features