1
0
Fork 0
mirror of https://github.com/kakwa/ldapcherry synced 2025-07-04 04:17:43 +02:00

improve robustness if user dn attribute contains something like ,cn=

This commit is contained in:
kakwa 2016-07-31 12:21:26 +02:00
parent d820cceeb6
commit 7f00264e32
2 changed files with 6 additions and 4 deletions

View file

@ -311,7 +311,9 @@ class Backend(ldapcherry.backend.Backend):
dn = \
self._str(self.dn_user_attr) + \
'=' + \
self._str(attrs[self.dn_user_attr]) + \
ldap.dn.escape_dn_chars(
self._str(attrs[self.dn_user_attr])
) + \
',' + \
self._str(self.userdn)
# gen the ldif fir add_s and add the user