Skip to content

Conversation

@martinthomson
Copy link
Owner

This wasn't properly tested previously, so it was resulting in a short read. Also, because zero-length chunks are useless, put in basic protection against receiving too many.

This protection isn't perfect, because it doesn't count across calls to poll() and it presently requires that two zero-length chunks are seen in the same call. That's OK, because the goal is to ensure that an attacker can't overload a reader with pointless work. If the reader is not overloaded, it might tolerate a few zero-length chunks, which is probably OK.

This wasn't properly tested previously, so it was resulting in a short
read.  Also, because zero-length chunks are useless, put in basic
protection against receiving too many.

This protection isn't perfect, because it doesn't count across calls to
`poll()` and it presently requires that two zero-length chunks are seen
in the same call. That's OK, because the goal is to ensure that an
attacker can't overload a reader with pointless work.  If the reader is
not overloaded, it might tolerate a few zero-length chunks, which is
probably OK.
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 this pull request may close these issues.

2 participants