[MattJ] don't send an authorization identity in SASL PLAIN. Fixes #5658

This commit is contained in:
Yann Leboulanger 2010-03-16 07:09:44 +01:00
parent 9c5b833edc
commit cd21d4a68f
1 changed files with 1 additions and 2 deletions

View File

@ -463,8 +463,7 @@ class SASL(PlugIn):
'\r', '').replace('\n', '')
node = Node('response', attrs={'xmlns':NS_SASL}, payload=[sasl_data])
elif self.mechanism == 'PLAIN':
sasl_data = u'%s\x00%s\x00%s' % (self.username + '@' + \
self._owner.Server, self.username, self.password)
sasl_data = u'\x00%s\x00%s' % (self.username, self.password)
sasl_data = sasl_data.encode('utf-8').encode('base64').replace(
'\n', '')
node = Node('auth', attrs={'xmlns': NS_SASL, 'mechanism': 'PLAIN'},