Skip to content
Snippets Groups Projects
Unverified Commit e537f269 authored by JM Lopez Lujan's avatar JM Lopez Lujan
Browse files

Fixes #44 - Error in bind_user method

parent c0554780
No related branches found
No related tags found
No related merge requests found
......@@ -150,7 +150,9 @@ class LDAP(object):
return
try:
conn = self.initialize
conn.simple_bind_s(user_dn.decode('utf-8'), password)
_user_dn = user_dn.decode('utf-8') \
if isinstance(user_dn, bytes) else user_dn
conn.simple_bind_s(_user_dn, password)
return True
except ldap.LDAPError:
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment