From 30b613ebb2a30ad00d886e6f9fc08716b54daf92 Mon Sep 17 00:00:00 2001 From: Roland Hedberg Date: Fri, 21 Mar 2014 08:59:52 +0100 Subject: [PATCH] Deal with no subject_confirmation element present. Changed version to 2.0.0, needed by pysaml2 dependent projects. --- setup.py | 2 +- src/saml2/response.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 9cca65d..30a2404 100755 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ if sys.version_info < (2, 7): setup( name='pysaml2', - version='2.0.0beta', + version='2.0.0', description='Python implementation of SAML Version 2 to be used in a WSGI environment', # long_description = read("README"), author='Roland Hedberg', diff --git a/src/saml2/response.py b/src/saml2/response.py index b987130..3c6bfa3 100644 --- a/src/saml2/response.py +++ b/src/saml2/response.py @@ -873,7 +873,9 @@ class AuthnResponse(StatusResponse): correct = 0 for subject_conf in self.assertion.subject.subject_confirmation: - if subject_conf.subject_confirmation_data.address: + if subject_conf.subject_confirmation_data is None: + correct += 1 # In reality undefined + elif subject_conf.subject_confirmation_data.address: if subject_conf.subject_confirmation_data.address == address: correct += 1 else: