fix(ext/node): validate serialized headers in node:http2#36041
Merged
bartlomieju merged 2 commits intoJul 15, 2026
Conversation
nathanwhit
marked this pull request as ready for review
July 14, 2026 23:44
bartlomieju
approved these changes
Jul 15, 2026
bartlomieju
pushed a commit
that referenced
this pull request
Jul 15, 2026
- protect the compact NUL-delimited JavaScript-to-Rust header representation without changing Node's invalid-header behavior - replace header-value code units that would become NUL after Latin-1 conversion with an invalid HTTP/2 byte for nghttp2 to reject or drop - preserve only supported nghttp2 header flags in the native parser - cover scalar, array, pseudo-header, non-ASCII low-byte, and native flag handling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Testing
cargo build --bin denocargo test -p deno_node http2_header_parse --lib -- --nocapturetarget/debug/deno test -A --config tests/config/deno.json tests/unit_node/http2_test.tscargo test -p node_compat_tests --test node_compat test-http2-client-unescaped-path -- --nocapturecargo test -p node_compat_tests --test node_compat test-http2-response-splitting -- --nocapturecargo test -p node_compat_tests --test node_compat test-http2-util-headers-list -- --nocapture./tools/format.js./tools/lint.js