bigchaindb / bigchaindb/cryptoconditions
VerifyingKey.verify throws ValueError or AttributeError
- Dominant language
- Python
- Stars
- 73
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
For some values `VerifyingKey.validate` throws `ValueError` or `AttributeError`, while it should just return `False`. As far as I remember, this happened when the signature parameter was out of the expected range of the method, so:
1. Inputting a non-string
2. Inputting a non-compliant fulfillment URI ('abc' e.g.)
See how we have to handle this currently in BDB:
- https://github.com/bigchaindb/bigchaindb/pull/641/files#diff-9f1ab5b5daf1b3072e2123b6939bfb07R150
- https://github.com/bigchaindb/bigchaindb/pull/641/files#diff-9f1ab5b5daf1b3072e2123b6939bfb07R171
Contributor guide
Research direction
Start at VerifyingKey.validate and trace how non-string inputs and non-compliant fulfillment URIs such as “abc” are handled. Compare the current behavior with the exception handling shown in the linked BigchainDB pull request; done means these inputs return False rather than raising ValueError or AttributeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cryptography
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100