Discard the (weird) ldap accounts that have no uid
This commit is contained in:
parent
576d43f44d
commit
b1fd6e6021
1 changed files with 1 additions and 0 deletions
|
@ -182,6 +182,7 @@ class LDAPSearch(SearchUnit):
|
|||
mail=attrs["mail"][0].decode("utf-8"),
|
||||
)
|
||||
for (_, attrs) in res
|
||||
if "uid" in attrs # Hack to discard weird accounts like root
|
||||
]
|
||||
except ldap.LDAPError as err:
|
||||
django_logger.error("An LDAP error occurred", exc_info=err)
|
||||
|
|
Loading…
Reference in a new issue