base64.encodestring() adds some \n in the string. Remove it

This commit is contained in:
Yann Leboulanger 2006-03-05 19:39:07 +00:00
parent 35e7328e19
commit d54915c62a
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ class SASL(PlugIn):
sasl_data='%s\x00%s\x00%s' % (self.username+'@' + self._owner.Server, sasl_data='%s\x00%s\x00%s' % (self.username+'@' + self._owner.Server,
self.username, self.password) self.username, self.password)
node=Node('auth', attrs={'xmlns':NS_SASL,'mechanism':'PLAIN'}, node=Node('auth', attrs={'xmlns':NS_SASL,'mechanism':'PLAIN'},
payload=[base64.encodestring(sasl_data)]) payload=[base64.encodestring(sasl_data).replace('\n',''])
else: else:
self.startsasl='failure' self.startsasl='failure'
self.DEBUG('I can only use DIGEST-MD5 and PLAIN mecanisms.', 'error') self.DEBUG('I can only use DIGEST-MD5 and PLAIN mecanisms.', 'error')