Add patch for ldap_authentication issue 4754

This commit is contained in:
Guillem Barba 2015-05-18 12:22:22 +02:00
parent 6a6352805e
commit f02abf8ac3
2 changed files with 23 additions and 0 deletions

22
issue15251002_1.diff Normal file
View file

@ -0,0 +1,22 @@
# HG changeset patch
# User Guillem Barba <guillembarba@gmail.com>
fix encoding error on LDAP login
issue4754
review15251002
Index: res.py
===================================================================
--- a/trytond/trytond/modules/ldap_authentication/res.py
+++ b/trytond/trytond/modules/ldap_authentication/res.py
@@ -89,6 +89,8 @@
else:
filter_ = '(%s=%s)' % (uid, login)
+ if isinstance(filter_, unicode):
+ filter_ = filter_.encode('utf-8')
result = con.search_s(dn, scope, filter_, attrs)
if config.get(section, 'active_directory'):
result = [x for x in result if x[0]]

1
series
View file

@ -49,3 +49,4 @@ stock_supply_production-performance-improvement.diff
top.diff
issue15211002-sale-confirmed-to-done.diff
purchase_translation.diff
issue15251002_1.diff