-
Notifications
You must be signed in to change notification settings - Fork 275
Identity.verify_digest should only return True on successful verification, otherwise throw according Exceptions #459
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
Comments
cc @qati |
You spotted indeed inconsistent behavior. The example you're describing raises an error because no sender address is specified. If you create a complete and valid I would argue that the latter is the actually wrong behavior and following security common practices Thoughts or objections @Archento @jrriehl @ejfitzgerald? |
Agreed @Dacksus my feeling is that this function should always throw. If python had a way to signal the return value should always be read then it might be different. I would refactor this so all error cases cause exceptions to be thrown |
Sorry my examples were a bit reductive and I have only highlighted the signature part, considering that all the other fields were put as such to generate a valid Envelope. Actually, with a valid Envelope and the signature that I have provided the code should just return false since the signature by itself is compromised hence not valid. |
Prerequisites
Category
Bug (unexpected behavior)
Expected Behavior
If we have an
Envelope
with a wrong signature e.g.sigWrong
and we call verify, it should return False.Observed Behavior
If we have an
Envelope
with a wrong signature e.g.sigWrong
and we call verify, it throws an errorTo Reproduce
No response
Version
v0.14.0
Environment Details (Optional)
No response
Failure Logs (Optional)
No response
Additional Information (Optional)
No response
The text was updated successfully, but these errors were encountered: