Merge pull request #3237 from ExaneServerTeam/bugfix/group-lookup-fix-referral

Fix group lookup when AD DNS Referal is in lookup path
This commit is contained in:
Hossein Shafagh 2020-11-09 14:38:12 -08:00 committed by GitHub
commit f42d9539fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -210,7 +210,8 @@ class LdapPrincipal:
self.ldap_groups = []
for group in lgroups:
(dn, values) = group
self.ldap_groups.append(values["cn"][0].decode("ascii"))
if type(values) == dict:
self.ldap_groups.append(values["cn"][0].decode("ascii"))
else:
lgroups = self.ldap_client.search_s(
self.ldap_base_dn, ldap.SCOPE_SUBTREE, ldap_filter, self.ldap_attrs