Skip to content

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

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 Chunked#read_trailer 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, so position does not change meaning, and marking them would drop them from non-chunked responses in a buffering proxy (the reasoning behind closing #64). 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 f5bb80f into main Nov 5, 2026
36 of 41 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