Skip to content
Merged
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
2 changes: 1 addition & 1 deletion sprayhound/modules/ldapconnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def get_users(self, dispatcher, users=None, disabled=True):
results = [
Credential(
samaccountname=entry['attributes']['sAMAccountName'],
bad_password_count=0 if 'badPwdCount' not in entry['attributes'] else int(entry['attributes']['badPwdCount']),
bad_password_count=0 if ('badPwdCount' not in entry['attributes'] or entry['attributes']['badPwdCount'] == []) else int(entry['attributes']['badPwdCount']),
threshold=self.domain_threshold if entry['dn'] not in self.granular_threshold else self.granular_threshold[entry['dn']],
pso=True if 'msDS-ResultantPSO' in entry['attributes'] and isinstance(entry['attributes']['msDS-ResultantPSO'], str) and entry['attributes']['msDS-ResultantPSO'].upper().startswith('CN=') else False
) for entry in res if isinstance(entry, dict) and 'attributes' in entry and entry['attributes']['sAMAccountName'][-1] != '$'
Expand Down
Loading