Open
Description
a pySMAL2 SP seems to work properly even if get a Response with an unspecified NameID value, as follow
<saml:Subject>
<saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient" NameQualifier="">
</saml:NameID>
We have the same behaviour even if the NameID statement would be absent.
For example, this trows a unhandled exception in djangosam2:
djangosaml2/backends.py", line 82, in _extract_user_identifier_params
user_lookup_value = session_info['name_id'].text
AttributeError: 'NoneType' object has no attribute 'text'
We have the same behaviour even if the Response have a missing Format value in NameID statement
<saml:NameID Format="" NameQualifier="https://that.url.org">
_e32052ed-bdda-4645-823c-7b92ee2c29c6
</saml:NameID>
even if the Format is malformed
<saml:NameID Format="" NameQualifier="https://that.url">
_e32052ed-bdda-4645-823c-7b92ee2c29c6
</saml:NameID>
even if NameQualifier is absent or malformed
<saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient" NameQualifier="">
_afb61c1f-08c2-4724-b15f-1af6447534c4
</saml:NameID>