-
Notifications
You must be signed in to change notification settings - Fork 107
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
runtime/src/protocol: Deserialize unknown rhp messages as invalid #5094
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also backport.
Ok(cbor::from_slice(&buffer)?) | ||
let message = cbor::from_slice(&buffer) | ||
.map_err(|error| { | ||
warn!(self.logger, "Failed to decode message"; "err" => %error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be useful to also log the bytes that failed to parse? (maybe in a debug
level log)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can do that, was not sure. I would definitely not log in warn
mode, as this would log up to 16MiB.
ff5e7b9
to
7244bb0
Compare
7244bb0
to
2d47682
Compare
Codecov Report
@@ Coverage Diff @@
## master #5094 +/- ##
==========================================
- Coverage 67.18% 67.16% -0.02%
==========================================
Files 501 501
Lines 53381 53381
==========================================
- Hits 35864 35854 -10
- Misses 13163 13183 +20
+ Partials 4354 4344 -10
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Before:
After: