Skip to content
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

Limit the max request size to be accepted #780

Merged
merged 10 commits into from
Jul 30, 2016
Merged

Conversation

iamqizhao
Copy link
Contributor

@iamqizhao iamqizhao commented Jul 27, 2016

Make it consistent with Java and C++ impl.

also fixes #785

TODO: client side memory guard.

@menghanl
Copy link
Contributor

LGTM.

@iamqizhao
Copy link
Contributor Author

@tamird Yes, it should be. I will do an entire pass on this file in a separate PR. Most of tests exist before codes became stringers.

}
}
if len(d) > maxMsgSize {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this validation be done before decompressing the message?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

additionally, it seems the message size validation is also being done in the parser: https://github.com/grpc/grpc-go/blob/master/rpc_util.go#L253

@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad Frame (with large length) can cause grpc.Server to explode
4 participants