mirror of
https://github.com/kakwa/ldapcherry
synced 2025-07-03 11:57:41 +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
|
@ -172,12 +172,12 @@ class TestError(object):
|
|||
|
||||
def testAddUser(self):
|
||||
try:
|
||||
inv.del_user(u'test☭')
|
||||
inv.del_user(u'test☭,cn=')
|
||||
except:
|
||||
pass
|
||||
inv = Backend(cfg, cherrypy.log, 'ldap', attr, 'uid')
|
||||
user = {
|
||||
'uid': u'test☭',
|
||||
'uid': u'test☭,cn=',
|
||||
'sn': u'test☭',
|
||||
'cn': u'test☭',
|
||||
'userPassword': u'test☭',
|
||||
|
@ -186,7 +186,7 @@ class TestError(object):
|
|||
'homeDirectory': '/home/test/'
|
||||
}
|
||||
inv.add_user(user)
|
||||
inv.del_user(u'test☭')
|
||||
inv.del_user(u'test☭,cn=')
|
||||
|
||||
def testModifyUser(self):
|
||||
inv = Backend(cfg, cherrypy.log, 'ldap', attr, 'uid')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue