Define 'soft' variable to prevent exception when doc cert is invalid #555
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The line
return append_error("Certificate Error", soft)
inside#validate_document_with_cert
can cause a NameError assoft
is not defined.This causes the NameError to propagate upwards in the case that the
ds:X509Certificate
element contains an invalid certificate.This can be triggered in the real world when you have an invalid
ds:X509Certificate
element on your response and are using theidp_cert_multi
configuration to validate it against multiple certificates.Fix and test verifying fix included.