1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-25 02:34:31 +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': if self.attributes.attributes[attr]['type'] == 'password':
pwd1 = attr + '1' pwd1 = attr + '1'
pwd2 = attr + '2' pwd2 = attr + '2'
if params['attrs'][pwd1] != params['attrs'][pwd2]: if pwd1 in params['attrs']:
raise Exception() if params['attrs'][pwd1] != params['attrs'][pwd2]:
params['attrs'][attr] = params['attrs'][pwd1] raise Exception()
params['attrs'][attr] = params['attrs'][pwd1]
if attr in params['attrs']: if attr in params['attrs']:
backends = self.attributes.get_backends_attributes(attr) backends = self.attributes.get_backends_attributes(attr)
for b in backends: for b in backends: