From 1be55dc8efd935c512308691d0fd3feaf4773441 Mon Sep 17 00:00:00 2001 From: Matthew Owens Date: Thu, 17 Aug 2017 10:22:07 -0400 Subject: [PATCH] modification to work with redhat SAML --- setup.py | 2 +- src/onelogin/saml2/response.py | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 7e9b9a83..082aebb8 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='python-saml', - version='2.2.3', + version='2.2.4', description='Onelogin Python Toolkit. Add SAML support to your Python software using this library', classifiers=[ 'Development Status :: 5 - Production/Stable', diff --git a/src/onelogin/saml2/response.py b/src/onelogin/saml2/response.py index eb5f73a4..84c6084e 100644 --- a/src/onelogin/saml2/response.py +++ b/src/onelogin/saml2/response.py @@ -512,11 +512,8 @@ def get_attributes(self): attribute_nodes = self.__query_assertion('/saml:AttributeStatement/saml:Attribute') for attribute_node in attribute_nodes: attr_name = attribute_node.get('Name') - if attr_name in attributes.keys(): - raise OneLogin_Saml2_ValidationError( - 'Found an Attribute element with duplicated Name', - OneLogin_Saml2_ValidationError.DUPLICATED_ATTRIBUTE_NAME_FOUND - ) + if attr_name not in attributes.keys(): + attributes[attr_name] = [] values = [] for attr in attribute_node.iterchildren('{%s}AttributeValue' % OneLogin_Saml2_Constants.NSMAP['saml']):