Skip to content
Open
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ See [our definition of contributors](https://github-activity.readthedocs.io/en/l
- `lookup_dn` now rejects an authenticating user if multiple DNs are returned
during lookup. ([#276](https://github.com/jupyterhub/ldapauthenticator/pull/276))
- In the edge case if both...

1. the following config is used:
- `lookup_dn = True`,
- `lookup_dn_user_dn_attribute = "cn"`
Expand Down
6 changes: 5 additions & 1 deletion ldapauthenticator/ldapauthenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,11 @@ def resolve_username(self, username_supplied_by_user):
search_base=self.user_search_base,
search_scope=ldap3.SUBTREE,
search_filter=search_filter,
attributes=[self.lookup_dn_user_dn_attribute],
attributes=(
[self.lookup_dn_user_dn_attribute]
if self.lookup_dn_user_dn_attribute
else ldap3.ALL_ATTRIBUTES
),
)

# identify unique search response entry
Expand Down