ldap: do not continue on timeout (#61128)
This commit is contained in:
parent
d65690e3e0
commit
ebab6fbf4c
|
@ -913,8 +913,6 @@ class LDAPBackend:
|
|||
results = self.normalize_ldap_results(results)
|
||||
except ldap.NO_SUCH_OBJECT:
|
||||
pass
|
||||
except ldap.TIMEOUT:
|
||||
log.error('[%s] connection timed out while retrieving group DNs', ldap_uri)
|
||||
else:
|
||||
group_dns.update(dn for dn, attrs in results)
|
||||
return group_dns
|
||||
|
@ -1499,7 +1497,10 @@ class LDAPBackend:
|
|||
for block in blocks:
|
||||
if realm and realm != block['realm']:
|
||||
continue
|
||||
yield from cls.get_users_for_block(block)
|
||||
try:
|
||||
yield from cls.get_users_for_block(block)
|
||||
except ldap.LDAPError as e:
|
||||
log.error('synchronization failed on an LDAP error: "%s"', e)
|
||||
|
||||
@classmethod
|
||||
def deactivate_orphaned_users(cls):
|
||||
|
|
Loading…
Reference in New Issue