Skip to content

Commit

Permalink
Merge pull request #268 from consideRatio/pr/specify-arg-names
Browse files Browse the repository at this point in the history
refactor: specify param names for Connection.search consistently
  • Loading branch information
consideRatio authored Sep 16, 2024
2 parents 1d9d0d5 + c7650a6 commit e7e5bfb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ldapauthenticator/ldapauthenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,10 @@ def get_user_attributes(self, conn, userdn):
attrs = {}
if self.auth_state_attributes:
found = conn.search(
userdn, "(objectClass=*)", attributes=self.auth_state_attributes
search_base=userdn,
search_scope=ldap3.SUBTREE,
search_filter="(objectClass=*)",
attributes=self.auth_state_attributes,
)
if found:
attrs = conn.entries[0].entry_attributes_as_dict
Expand Down Expand Up @@ -506,7 +509,7 @@ async def authenticate(self, handler, data):
found = False
for group in self.allowed_groups:
found = conn.search(
group,
search_base=group,
search_scope=ldap3.BASE,
search_filter=self.group_search_filter.format(
userdn=escape_filter_chars(userdn),
Expand Down

0 comments on commit e7e5bfb

Please sign in to comment.