[tryton-debian-vcs] tryton-modules-ldap-authentication branch debian-jessie-3.4 updated. debian/3.4.2-1-2-g3cbc99b
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Mon Sep 21 12:29:32 UTC 2015
The following commit has been merged in the debian-jessie-3.4 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-ldap-authentication.git;a=commitdiff;h=debian/3.4.2-1-2-g3cbc99b
commit 3cbc99bdec4a2906669a7892691efc1dbf66af21
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Sep 20 20:53:08 2015 +0200
Releasing debian version 3.4.3-1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/debian/changelog b/debian/changelog
index 9ee237b..f9952f5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-modules-ldap-authentication (3.4.3-1) unstable; urgency=medium
+
+ * Merging upstream version 3.4.3.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Sun, 20 Sep 2015 20:53:08 +0200
+
tryton-modules-ldap-authentication (3.4.2-1) unstable; urgency=medium
* Wrapping and sorting control files (wrap-and-sort -bts).
commit dee4e192c8822fab42b8dc5f17bab4676cc97c06
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Sep 20 20:53:07 2015 +0200
Merging upstream version 3.4.3.
diff --git a/CHANGELOG b/CHANGELOG
index f7ca80d..03af643 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.4.3 - 2015-09-19
+* Bug fixes (see mercurial logs for details)
+
Version 3.4.2 - 2015-05-22
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index ef52f9e..5448834 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_ldap_authentication
-Version: 3.4.2
+Version: 3.4.3
Summary: Tryton module to authenticate users through LDAP
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/res.py b/res.py
index d393de3..85a9d25 100644
--- a/res.py
+++ b/res.py
@@ -58,6 +58,13 @@ def ldap_connection():
return conn
+# python-ldap works only with str
+def unicode2str(param):
+ if isinstance(param, unicode):
+ param = param.encode('utf-8')
+ return param
+
+
class User:
__name__ = 'res.user'
@@ -85,9 +92,9 @@ class User:
}.get(scope)
uid = config.get(section, 'uid', 'uid')
if filter_:
- filter_ = '(&(%s=%s)%s)' % (uid, login, filter_)
+ filter_ = '(&(%s=%s)%s)' % (uid, unicode2str(login), filter_)
else:
- filter_ = '(%s=%s)' % (uid, login)
+ filter_ = '(%s=%s)' % (uid, unicode2str(login))
result = con.search_s(dn, scope, filter_, attrs)
if config.get(section, 'active_directory'):
@@ -143,8 +150,10 @@ class User:
users = cls.ldap_search_user(user.login, con, attrs=[uid])
if users and len(users) == 1:
[(dn, attrs)] = users
- if con.simple_bind_s(dn, old_password):
- con.passwd_s(dn, old_password, values['password'])
+ if con.simple_bind_s(dn, unicode2str(old_password)):
+ con.passwd_s(
+ dn, unicode2str(old_password),
+ unicode2str(values['password']))
values = values.copy()
del values['password']
else:
@@ -164,7 +173,8 @@ class User:
users = cls.ldap_search_user(login, con, attrs=[uid])
if users and len(users) == 1:
[(dn, attrs)] = users
- if password and con.simple_bind_s(dn, password):
+ if (password
+ and con.simple_bind_s(dn, unicode2str(password))):
user_id, _ = cls._get_login(login)
if user_id:
LoginAttempt.remove(login)
diff --git a/tryton.cfg b/tryton.cfg
index b72884d..1ad3581 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.4.2
+version=3.4.3
depends:
ir
res
diff --git a/trytond_ldap_authentication.egg-info/PKG-INFO b/trytond_ldap_authentication.egg-info/PKG-INFO
index f91ce97..7f12121 100644
--- a/trytond_ldap_authentication.egg-info/PKG-INFO
+++ b/trytond_ldap_authentication.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond-ldap-authentication
-Version: 3.4.2
+Version: 3.4.3
Summary: Tryton module to authenticate users through LDAP
Home-page: http://www.tryton.org/
Author: Tryton
--
tryton-modules-ldap-authentication
More information about the tryton-debian-vcs
mailing list