mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
23 lines
658 B
Diff
23 lines
658 B
Diff
# 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]]
|
|
|