Projet

Général

Profil

0001-Do-not-unconditionnaly-dump-the-NameIDPolicy-node-as.patch

Benjamin Dauvergne, 17 juin 2015 21:18

Télécharger (1,29 ko)

Voir les différences:

Subject: [PATCH] Do not unconditionnaly dump the NameIDPolicy node as it is
 optional (fixes #7612)

 src/authentic2/idp/saml/saml2_endpoints.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/authentic2/idp/saml/saml2_endpoints.py
500 500
                AUTHENTIC_STATUS_CODE_MISSING_DESTINATION)
501 501
    # Check NameIDPolicy or force the NameIDPolicy
502 502
    name_id_policy = login.request.nameIdPolicy
503
    logger.debug('nameID policy is %s' % name_id_policy.dump())
504
    if name_id_policy.format and \
503
    if name_id_policy and name_id_policy.format and \
505 504
            name_id_policy.format != \
506 505
                lasso.SAML2_NAME_IDENTIFIER_FORMAT_UNSPECIFIED:
506
        logger.debug('nameID policy is %s' % name_id_policy.dump())
507 507
        nid_format = saml2_urn_to_nidformat(name_id_policy.format,
508 508
            accepted=policy.accepted_name_id_format)
509 509
        logger.debug('nameID format %s' % nid_format)
510
-