-
Notifications
You must be signed in to change notification settings - Fork 45
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
Work around the panic thrown by IntervalDigestFromBytes #20
Comments
@liamsi, If this seems like a valid issue, I would like to resolve it. I would also suggest keeping the same pattern(data validation in deserializer returning errors) over all the repos to reduce DOS attack vectors. |
That's to prevent creating any invalid |
It is used here. As an application user, I meant LL core.
I see, however imagine a faulty Node sending a valid protobuf message, but with an empty digest. In such a case the node will panic while returning an error will keep it alive. |
You are right! We should fix this then. |
IntervalDigestFromBytes is meant to deserialize bytes commonly received from the wire that does not guarantee to compel with the panic check, allowing a non-valid network message to kill an application that uses the lib. We can either:
But obviously, the first one is more preferable.
The text was updated successfully, but these errors were encountered: