We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 805915b commit f3a5df6Copy full SHA for f3a5df6
src/saml2/sigver.py
@@ -1820,10 +1820,11 @@ def pre_encrypt_assertion(response):
1820
assertion = response.assertion
1821
response.assertion = None
1822
response.encrypted_assertion = EncryptedAssertion()
1823
- if isinstance(assertion, list):
1824
- response.encrypted_assertion.add_extension_elements(assertion)
1825
- else:
1826
- response.encrypted_assertion.add_extension_element(assertion)
+ if assertion is not None:
+ if isinstance(assertion, list):
+ response.encrypted_assertion.add_extension_elements(assertion)
+ else:
1827
+ response.encrypted_assertion.add_extension_element(assertion)
1828
# txt = "%s" % response
1829
# _ass = "%s" % assertion
1830
# _ass = rm_xmltag(_ass)
0 commit comments