summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeppelinux <giuseppe.demarco@unical.it>2021-01-24 15:01:51 +0100
committerpeppelinux <giuseppe.demarco@unical.it>2021-01-24 15:17:52 +0100
commitf8615e97126eb429ed837a16a5fbc932746afab1 (patch)
tree6f29cea7826c88b7f755398e6c0dff052af67303
parent7f1119737838ad0e9cf0c2e8ac2d34f9d66a1ab9 (diff)
downloadpysaml2-f8615e97126eb429ed837a16a5fbc932746afab1.tar.gz
Response with unvalued AudienceRestriction (Condition) Handling
-rw-r--r--src/saml2/response.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/saml2/response.py b/src/saml2/response.py
index 50e4f6b0..950a5f6b 100644
--- a/src/saml2/response.py
+++ b/src/saml2/response.py
@@ -209,10 +209,10 @@ def for_me(conditions, myself):
if not restriction.audience:
continue
for audience in restriction.audience:
- if audience.text.strip() == myself:
+ if audience.text and audience.text.strip() == myself:
return True
else:
- logger.debug("AudienceRestriction - One condition not satisfied: %s != %s" % (audience.text.strip(), myself))
+ logger.debug("AudienceRestriction - One condition not satisfied: {} != {}".format(audience.text, myself))
logger.debug("AudienceRestrictions not satisfied!")
return False