mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
Skip referrals when converting LDAP result to LDAPEntry
When converting the result obtained by python-ldap library, we need to skip unresolved referral entries, since they cannot be converted. https://fedorahosted.org/freeipa/ticket/3814
This commit is contained in:
parent
04839a2aea
commit
22681013b2
@ -425,6 +425,15 @@ class IPASimpleLDAPObject(object):
|
||||
original_dn = dn_tuple[0]
|
||||
original_attrs = dn_tuple[1]
|
||||
|
||||
# original_dn is None if referral instead of an entry was
|
||||
# returned from the LDAP server, we need to skip this item
|
||||
if original_dn is None:
|
||||
log_msg = 'Referral entry ignored: {ref}'\
|
||||
.format(ref=str(original_attrs))
|
||||
self.log.debug(log_msg)
|
||||
|
||||
continue
|
||||
|
||||
ipa_entry = LDAPEntry(self, DN(original_dn))
|
||||
|
||||
for attr, original_values in original_attrs.items():
|
||||
|
Loading…
Reference in New Issue
Block a user