When CASClientWithSAMLV1 is verifying a ticket, which contains an <Attribute> element with no <AttributeValue>, the verify_ticket function crashes in the following piece of code:
values = at.findall(SAML_1_0_ASSERTION_NS + 'AttributeValue')
if len(values) > 1:
values_array = []
for v in values:
values_array.append(v.text)
attributes[at.attrib['AttributeName']] = values_array
else:
attributes[at.attrib['AttributeName']] = values[0].text
A brief examination of the SAML 1.0 specification confirms that attributes with no <AttributeValue> are indeed valid.
What is the proper way of handling such attributes? Ignoring them completely? Or parsing them with an empty list as their value?
When
CASClientWithSAMLV1is verifying a ticket, which contains an<Attribute>element with no<AttributeValue>, theverify_ticketfunction crashes in the following piece of code:A brief examination of the SAML 1.0 specification confirms that attributes with no
<AttributeValue>are indeed valid.What is the proper way of handling such attributes? Ignoring them completely? Or parsing them with an empty list as their value?