1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-12-28 15:41:37 +01:00

fix error if password is not in modified attributes

This commit is contained in:
kakwa 2015-06-28 23:33:37 +02:00
parent fb0f601ad4
commit ae5c857c74

View File

@ -542,9 +542,10 @@ class LdapCherry(object):
if self.attributes.attributes[attr]['type'] == 'password':
pwd1 = attr + '1'
pwd2 = attr + '2'
if params['attrs'][pwd1] != params['attrs'][pwd2]:
raise Exception()
params['attrs'][attr] = params['attrs'][pwd1]
if pwd1 in params['attrs']:
if params['attrs'][pwd1] != params['attrs'][pwd2]:
raise Exception()
params['attrs'][attr] = params['attrs'][pwd1]
if attr in params['attrs']:
backends = self.attributes.get_backends_attributes(attr)
for b in backends: