Skip to content

allow signing of content-length header #1408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bagbag
Copy link

@bagbag bagbag commented May 23, 2025

Align ignored headers for signing to current aws sdks.

Current V3 JS-SDK only ignores content-type: https://github.com/aws/aws-sdk-js-v3/blob/86a26c6e93a79415385443cece377d4761dba770/packages/s3-request-presigner/src/presigner.ts#L80

AWS Rust SDK removed filtering out content-length: awslabs/aws-sdk-rust#466

https://github.com/awslabs/aws-sdk-rust/blob/98d89ab5a93ef71d260c8399c4e9be58175d7269/sdk/aws-sigv4/src/http_request/canonical_request.rs#L982

This change is useful to allow enforcement of max file sizes when an untrusted client is in charge of uploading files through presigned put urls.

If this change is approved, I'm looking forward to extend the presign methods to allow specifying the headers.

@bagbag bagbag force-pushed the allow-more-signed-headers branch from 9d9ed4c to cbb7a9d Compare May 23, 2025 20:46
@bagbag bagbag changed the title allow signing of some previously ignored headers allow signing of content-length header May 23, 2025
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