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 number of bytes read from HTTP request bodies #96

Closed
rhcarvalho opened this issue Nov 28, 2019 · 0 comments · Fixed by #168
Closed

Limit number of bytes read from HTTP request bodies #96

rhcarvalho opened this issue Nov 28, 2019 · 0 comments · Fixed by #168
Milestone

Comments

@rhcarvalho
Copy link
Contributor

See SDK development docs:

[request].data:
Optional. Submitted data in a format that makes the most sense. SDKs should discard large bodies by default. Can be given as string or structural data of any format.

See sentry-dotnet implementation as a reference.

We can use an io.LimitedReader and an io.MultiReader to limit the number of bytes the Sentry SDK reads, while still allowing the downstream handlers to read the full body.

The limits should be applied at least in Request.FromHTTPRequest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants