Modify ↓
Opened 13 years ago
Closed 12 years ago
#9538 closed defect (fixed)
Setting base_dn as the top-most level,with referrals off, generates a KeyError: 'sAMAccountName'
Reported by: | Owned by: | John Hampton | |
---|---|---|---|
Priority: | normal | Component: | DirectoryAuthPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
Even though the top-most level of the tree encompasses all containers, trying to view the user list shows a Trac error of KeyError : sAMAccountName.
This of course happens when all the users are found with the search filter (objectCategory=person) and some values returned aren't dictionaries.
At first, making a more specific base_dn worked. (eg. cn=Users,dc=my,dc=example,dc=com) But that didn't get every user.
So the line I configured was inside auth.py line 50
- userinfo = [self._get_userinfo(u[1]) for u in users]
+ userinfo = [self._get_userinfo(u[1]) for u in users if type(u[0]) == type({})] and now the list according to the search filter generates without errors.
Attachments (0)
Note: See
TracTickets for help on using
tickets.
line 50
+ userinfo = [self._get_userinfo(u[1]) for u in users if type(u[0]) == type({})]