-
-
Notifications
You must be signed in to change notification settings - Fork 568
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
Forward soft argument to validate_signature #664
base: master
Are you sure you want to change the base?
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_document
method chain, thesoft
parameter is passed down from one method to another except in the hand off fromvalidate_document_with_cert
tovalidate_signature
.