Skip to content

Commit

Permalink
Merge pull request #1 from zestsoftware/master
Browse files Browse the repository at this point in the history
Skip objects that were found in LDAP while searching on several attri…
  • Loading branch information
datakurre committed Oct 11, 2017
2 parents 2328007 + 43cc656 commit f7c2ccd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/node/ext/ldap/ugm/_api.py
Expand Up @@ -636,7 +636,10 @@ def search(self, criteria=None, attrlist=None,
if attrlist is not None:
_results = list()
for _, att in results:
user_id = att[self._key_attr][0]
try:
user_id = att[self._key_attr][0]
except (KeyError, IndexError):
continue
aliased = self._alias_dict(att)
# append all matching aliases (in addition to attrlist oness)
_results.append((user_id, aliased))
Expand Down

0 comments on commit f7c2ccd

Please sign in to comment.