Skip to content

Record why received trailers are not marked with trailer! in a SECURITY: comment. - #261

Merged
samuel-williams-shopify merged 3 commits into
mainfrom
received-trailer-security-note
Nov 5, 2026
Merged

samuel-williams-shopify merged 3 commits into
mainfrom
received-trailer-security-note

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

Add a SECURITY: comment at HTTP2::Stream#receive_trailing_headers recording that merging received trailers into the headers object without Headers#trailer! was investigated as a smuggling vector and rejected: add(..., trailer: true) admits only fields whose policy permits them as trailers, pseudo-headers are rejected before that, and marking them would drop them from non-chunked responses in a buffering proxy (the reasoning behind closing #259). The open question of the Generic fallback policy is socketry/protocol-http#127.

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor Author

Moved the comment from the method documentation into the body, directly above the trailer: true call it explains, so it sits where a reviewer would flag it and stays out of the generated docs.

@samuel-williams-shopify
samuel-williams-shopify merged commit b7029c7 into main Nov 5, 2026
33 of 40 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the received-trailer-security-note branch November 5, 2026 09:47
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.

1 participant