diff --git a/lib/async/http/protocol/http2/stream.rb b/lib/async/http/protocol/http2/stream.rb index 2ca4207c..ab2d55d4 100644 --- a/lib/async/http/protocol/http2/stream.rb +++ b/lib/async/http/protocol/http2/stream.rb @@ -61,6 +61,7 @@ def add_header(key, value, trailer: false) # @parameter end_stream [Boolean] Whether the stream ends after these headers. def receive_trailing_headers(headers, end_stream) headers.each do |key, value| + # SECURITY: Trailers join the headers unmarked. This is not a smuggling vector: `trailer: true` admits only fields whose policy permits trailers, and position does not change what those fields mean. add_header(key, value, trailer: true) end end