Skip to content

Commit 1f83e63

Browse files
committed
Fix bug where ldap parser would not parse all values of an attribute containing a list
1 parent 5f45bfc commit 1f83e63

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

nxc/parsers/ldap_results.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ def parse_result_attributes(ldap_response):
88
continue
99
attribute_map = {}
1010
for attribute in entry["attributes"]:
11-
attribute_map[str(attribute["type"])] = str(attribute["vals"][0])
11+
val = [str(val) for val in attribute["vals"].components]
12+
attribute_map[str(attribute["type"])] = val if len(val) > 1 else val[0]
1213
parsed_response.append(attribute_map)
1314
return parsed_response

0 commit comments

Comments
 (0)