Files
floci/src/main/java/io/github
Hector Ventura 9b7f8e40f0 fix(s3): reject response-* overrides on unsigned requests (#1098)
* fix(s3): reject response-* overrides on unsigned requests

AWS S3 requires a signed request (Authorization header or presigned URL)
when any of the six response-* query parameters are present. Unsigned
requests with these parameters were silently honoured, diverging from
real S3 behaviour in a way that would only surface in production.

Confirmed against real S3: HTTP 400, Code=InvalidRequest,
"Request specific response headers cannot be used for anonymous GET requests."

Adds hasAny() to ResponseHeaderOverrides and an isSigned() check
(Authorization header or X-Amz-Algorithm query param) applied to both
GetObject and HeadObject before the overrides are applied.

Closes #918

* fix(s3): sign response-* override tests to match AWS requirement

PreSignedUrlIntegrationTest orders 11, 12, 14, and 16 made anonymous
requests with response-* query params and expected 200. These tests now
correctly reflect the AWS requirement that response-* overrides must be
on a signed request — anonymous requests must be rejected (closes #918).
2026-05-30 16:04:51 -05:00
..