Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define 'soft' variable to prevent exception when doc cert is invalid #555

Merged
merged 1 commit into from
Nov 9, 2020

Conversation

atyndall
Copy link
Contributor

@atyndall atyndall commented Nov 9, 2020

The line return append_error("Certificate Error", soft) inside #validate_document_with_cert can cause a NameError as soft 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 the idp_cert_multi configuration to validate it against multiple certificates.

Fix and test verifying fix included.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 98.001% when pulling d0e117a on appbot:multi-cert-validation-error into 24e90a3 on onelogin:master.

@pitbulk pitbulk merged commit 5322d19 into SAML-Toolkits:master Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants