From caef6a889e4623ec0d91d250edeb9ef6f5e7e0fc Mon Sep 17 00:00:00 2001 From: Carpentier Pierre-Francois Date: Wed, 6 Jul 2016 14:00:36 +0200 Subject: [PATCH] Fix encoding issues in AD backend --- ldapcherry/backend/backendAD.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ldapcherry/backend/backendAD.py b/ldapcherry/backend/backendAD.py index ddad708..3d69f49 100644 --- a/ldapcherry/backend/backendAD.py +++ b/ldapcherry/backend/backendAD.py @@ -180,14 +180,14 @@ class Backend(ldapcherry.backend.backendLdap.Backend): ldap_client = self._bind() - dn = str('CN=%(cn)s,%(user_dn)s' % { + dn = self._str('CN=%(cn)s,%(user_dn)s' % { 'cn': cn, 'user_dn': self.userdn }) attrs = {} - attrs['unicodePwd'] = str(password_value) + attrs['unicodePwd'] = self._str(password_value) ldif = modlist.modifyModlist({'unicodePwd': 'tmp'}, attrs) ldap_client.modify_s(dn, ldif)