diff options
author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2019-08-24 19:53:29 +0300 |
---|---|---|
committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2019-08-24 19:53:59 +0300 |
commit | 2c3c426c7f431fe0f31cc2f67145acec31348530 (patch) | |
tree | 11d97d8c0c4cb604bc603c39914376f7e2b00650 /src/saml2/response.py | |
parent | 2f2b02d4711674a4dc63980b52ba652aba716a09 (diff) | |
download | pysaml2-2c3c426c7f431fe0f31cc2f67145acec31348530.tar.gz |
Validate the audience of assertions regardless of a response being unsolicited
Fixes #609
Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
Diffstat (limited to 'src/saml2/response.py')
-rw-r--r-- | src/saml2/response.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/saml2/response.py b/src/saml2/response.py index 4c884c30..f61a376f 100644 --- a/src/saml2/response.py +++ b/src/saml2/response.py @@ -611,10 +611,9 @@ class AuthnResponse(StatusResponse): else: self.not_on_or_after = 0 - if not self.allow_unsolicited: - if not for_me(conditions, self.entity_id): - if not lax: - raise Exception("Not for me!!!") + if not for_me(conditions, self.entity_id): + if not lax: + raise Exception("Not for me!!!") if conditions.condition: # extra conditions for cond in conditions.condition: |