diff options
author | Alex Auvolat <alex@adnab.me> | 2024-02-28 00:27:54 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-02-28 12:24:21 +0100 |
commit | e9f759d4cb9be28584ab511a0a2dc78b579475c8 (patch) | |
tree | 471ad303d34e992ee151227b40dd5261b85711b1 /src/api/s3 | |
parent | a5e4bfeae9d705e0c8a56dfd8268e1309999c5cd (diff) | |
download | garage-e9f759d4cb9be28584ab511a0a2dc78b579475c8.tar.gz garage-e9f759d4cb9be28584ab511a0a2dc78b579475c8.zip |
[fix-presigned] presigned requests: allow x-amz-* query parameters to stand in for equivalent headers
Diffstat (limited to 'src/api/s3')
-rw-r--r-- | src/api/s3/api_server.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/api/s3/api_server.rs b/src/api/s3/api_server.rs index 08405923..fdfaf0a4 100644 --- a/src/api/s3/api_server.rs +++ b/src/api/s3/api_server.rs @@ -107,7 +107,7 @@ impl ApiHandler for S3ApiServer { async fn handle( &self, - req: Request<IncomingBody>, + mut req: Request<IncomingBody>, endpoint: S3ApiEndpoint, ) -> Result<Response<ResBody>, Error> { let S3ApiEndpoint { @@ -125,7 +125,8 @@ impl ApiHandler for S3ApiServer { return Ok(options_res.map(|_empty_body: EmptyBody| empty_body())); } - let (api_key, mut content_sha256) = check_payload_signature(&garage, "s3", &req).await?; + let (api_key, mut content_sha256) = + check_payload_signature(&garage, "s3", &mut req).await?; let api_key = api_key .ok_or_else(|| Error::forbidden("Garage does not support anonymous access yet"))?; |