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
hubble: Use protobuf GetType() helper in v1.FlowProtocol() to avoid possible panic #27889
hubble: Use protobuf GetType() helper in v1.FlowProtocol() to avoid possible panic #27889
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.
😇
I guess this affects v1.14 and should be backported, correct? |
@rolinh Sort of. It's not an actual bug in practice, just a possible bug, so I don't know if we need to backport it. I only noticed when I was writing some new tests in another PR, and the tests were triggering a panic here because the code used this function. |
…anic If the event type is unset, or the flow is nil, it's possible that FlowProtocol could panic. To avoid this, use the GetType() helper method which is nil safe. Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
cf3299f
to
06d94b9
Compare
Rebased, and then I shortened the commit message summary to satisfy |
/test |
If the event type is unset, or the flow is nil, it's possible that FlowProtocol could panic. To avoid this, use the GetType() helper method which is nil safe.