Deal with no subject_confirmation element present.

Changed version to 2.0.0, needed by pysaml2 dependent projects.
This commit is contained in:
Roland Hedberg
2014-03-21 08:59:52 +01:00
parent 09f19c7733
commit 30b613ebb2
2 changed files with 4 additions and 2 deletions

View File

@@ -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',

View File

@@ -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: