From cd21d4a68f3ca8da749ebe9915b5c9861bac93f0 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Tue, 16 Mar 2010 07:09:44 +0100
Subject: [PATCH] [MattJ] don't send an authorization identity in SASL PLAIN.
 Fixes #5658

---
 src/common/xmpp/auth_nb.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/common/xmpp/auth_nb.py b/src/common/xmpp/auth_nb.py
index d0e615d1db..ff54b80e7a 100644
--- a/src/common/xmpp/auth_nb.py
+++ b/src/common/xmpp/auth_nb.py
@@ -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'},
-- 
GitLab