base64.encodestring() adds some \n in the string. Remove it
This commit is contained in:
		
							parent
							
								
									35e7328e19
								
							
						
					
					
						commit
						d54915c62a
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -79,7 +79,7 @@ class SASL(PlugIn):
 | 
			
		|||
			sasl_data='%s\x00%s\x00%s' % (self.username+'@' + self._owner.Server, 
 | 
			
		||||
																	self.username, self.password)
 | 
			
		||||
			node=Node('auth', attrs={'xmlns':NS_SASL,'mechanism':'PLAIN'}, 
 | 
			
		||||
								payload=[base64.encodestring(sasl_data)])
 | 
			
		||||
								payload=[base64.encodestring(sasl_data).replace('\n',''])
 | 
			
		||||
		else:
 | 
			
		||||
			self.startsasl='failure'
 | 
			
		||||
			self.DEBUG('I can only use DIGEST-MD5 and PLAIN mecanisms.', 'error')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue