fix(http2): pass proper value to h2 max_local_error_reset_streams
#3782
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The patch #3528 added the ability for hyper users to configure
max_local_error_reset_streams
via the server builder to hyper v0.14.29. It was then pulled in to hyper v1.2.0 as well in #3530, where the wrong parametermax_pending_accept_reset_streams
is passed to h2's builder asmax_local_error_reset_streams
.This could lead to significant impact especially when a hyper user does not set
max_pending_accept_reset_streams
, because its default value isNone
and passingNone
to h2'smax_local_error_reset_streams
method will make the server vulnerable to DOS attacks.This issue has been fixed in this patch, simply by passing the correct value to the h2's builder method.
Note that the original patch merged into v0.14 does not suffer this problem.