Forward soft argument to validate_signature#664
Forward soft argument to validate_signature#664neanias wants to merge 1 commit intoSAML-Toolkits:masterfrom
Conversation
When calling the `validate_document` method chain, the `soft` parameter is passed down from one method to another except in the hand off from `validate_document_with_cert` to `validate_signature`.
|
@neanias two questions:
|
|
For 1. I would think it was For 2. it's been over a year since I opened this so I can't exactly remember why I opened the PR in the first place. I think I was trying to understand why my code wasn't throwing any errors when I passed in |
|
The |
|
OK. @pitbulk I think it's reasonable to merge this. |
|
I remember I checked it time ago when was registered, but for some reason I did not merge it. As "validate signature" is a critical piece, I will need more time to review this PR and check why it was implemented in that way. |
|
This change seems important for security. The previous logic made signature validation always a soft validation. However, if one's system is relying on errors to be raised, then currently failed signature validation won't raise an error, and one will permit a failed signature validation when one should actually reject it! 😱 I can't imaginee a case where a user wants hard errors, but only wants signature validation to be soft. Conversely, users using soft validations won't be affected at all. |
|
Also realised that I didn't add tests to check that the right hard error is raised when soft is disabled. I'll add one now |
|
I see. So does this method need to accept the |
When calling the
validate_documentmethod chain, thesoftparameter is passed down from one method to another except in the hand off fromvalidate_document_with_certtovalidate_signature.