Skip to content

Caps in 'X-Amz-User-Agent' #3274

@rmoqpd5t

Description

@rmoqpd5t

Describe the bug

In REDCap's use of aws-sdk-php I found the client's header 'x-amz-user-agent' not being blacklisted in ./src/Signature/SignatureV4.php's function getHeaderBlacklist() and therefore authorization not working due to case sensitivity not matching 'X-Amz-User-Agent'. All of the other items in the blacklist are lower, shouldn't 'X-Amz-User-Agent' ? Or include in the blacklist both 'X-Amz-User-Agent' and 'x-amz-user-agent' ?

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

All lower 'x-amz-user-agent' should be blacklisted

Current Behavior

'x-amz-user-agent' is not blacklisted

Reproduction Steps

Attempt to use REDcap's S3 implemention with an S3 endpoint and debug the reason the signature isn't working

Possible Solution

Add both 'x-amz-user-agent' and 'X-Amz-User-Agent' if needed

Additional Information/Context

No response

SDK version used

3.374.0

Environment details (Version of PHP (php -v)? OS name and version, etc.)

PHP 8.3.29

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions