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

Add a body wrapper that validates the returned length against content length #3487

Open
rcoh opened this issue Mar 13, 2024 · 2 comments
Open
Labels

Comments

@rcoh
Copy link
Collaborator

rcoh commented Mar 13, 2024

Although Hyper attempts to protect against this case, in general it is possible for our HTTP client to return bodies that are shorter (or longer!) than we expect.

In this case, we should return an error to the customer (rather than happily returning obviously wrong data).

This should be handled by wrapping the body in a body wrapper that is constructed based on the content length returned from the server (similar to how checksum wrapping works today).

Unlike checksums, this would always be installed.

@jdisanti
Copy link
Collaborator

jdisanti commented Apr 5, 2024

Implemented in #3491

@jdisanti jdisanti added pending-release client bug Something isn't working labels Apr 5, 2024
@jdisanti
Copy link
Collaborator

jdisanti commented Apr 5, 2024

Looks like the fix was disabled due to #3523

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

No branches or pull requests

2 participants