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:
parent
d820cceeb6
commit
7f00264e32
2 changed files with 6 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue