Skip to content

Commit f8615e9

Browse files
committed
Response with unvalued AudienceRestriction (Condition) Handling
1 parent 7f11197 commit f8615e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/saml2/response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,10 @@ def for_me(conditions, myself):
209209
if not restriction.audience:
210210
continue
211211
for audience in restriction.audience:
212-
if audience.text.strip() == myself:
212+
if audience.text and audience.text.strip() == myself:
213213
return True
214214
else:
215-
logger.debug("AudienceRestriction - One condition not satisfied: %s != %s" % (audience.text.strip(), myself))
215+
logger.debug("AudienceRestriction - One condition not satisfied: {} != {}".format(audience.text, myself))
216216
logger.debug("AudienceRestrictions not satisfied!")
217217
return False
218218

0 commit comments

Comments
 (0)