Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ldapauthenticator/ldapauthenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,9 @@ def authenticate(self, handler: web.RequestHandler, data: dict) -> typing.Option
search_scope=ldap3.SUBTREE,
attributes=self.user_membership_attribute if self.allowed_groups else list(),
paged_size=2)

# remove all searchResRef from response
conn.response = [search_ref for search_ref in conn.response if 'type' in search_ref and search_ref['type'] != 'searchResRef']

# handle abnormal search results
if not conn.response or len(conn.response) > 1:
Expand Down