idp_saml: fix missing cast to list (#41879)

This commit is contained in:
Benjamin Dauvergne 2020-04-20 13:18:39 +02:00
parent 87b0eae371
commit a11402ce4c
1 changed files with 2 additions and 1 deletions

View File

@ -233,7 +233,8 @@ def add_attributes(request, assertion, provider):
for attribute in attribute_statement.attribute:
name = force_text(attribute.name)
name_format = force_text(attribute.nameFormat)
attributes[(name, name_format)] = attribute, attribute.attributeValue
# sequence from lasso are always tuple, so convert to list
attributes[(name, name_format)] = attribute, list(attribute.attributeValue)
for atv in attribute.attributeValue:
if atv.any and len(atv.any) == 1 and isinstance(atv.any[0], lasso.MiscTextNode) and \
atv.any[0].textChild: