Skip to content

Comments

TTP/2: validate pseudo-headers in inbound request trailers#637

Open
arturobernalg wants to merge 1 commit intoapache:masterfrom
arturobernalg:checkTrailers
Open

TTP/2: validate pseudo-headers in inbound request trailers#637
arturobernalg wants to merge 1 commit intoapache:masterfrom
arturobernalg:checkTrailers

Conversation

@arturobernalg
Copy link
Member

RFC9113 8.1. HTTP Message Framing Trailers MUST NOT include pseudo-header fields (Section 8.3). An endpoint that receives pseudo-header fields in trailers MUST treat the request or response as malformed (Section 8.1.1).

ServerH2StreamHandler forwarded inbound request trailers (HEADERS in BODY
state) directly to AsyncServerExchangeHandler.streamEnd(...) without
validating trailer semantics. This allowed pseudo-header fields (':...')
to slip through on the server path.
@arturobernalg arturobernalg requested a review from ok2c February 23, 2026 11:46
try {
TrailersValidationSupport.verify(headers);
} catch (final H2ConnectionException ex) {
throw new H2StreamResetException(H2Error.PROTOCOL_ERROR, ex.getMessage());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arturobernalg Please pick up my changes from master and rebase

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