Skip to content
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

Update AWS4RequestSigner.cs #29

Merged
merged 3 commits into from
Apr 8, 2021
Merged

Conversation

branch-slalom
Copy link
Contributor

@branch-slalom branch-slalom commented Mar 29, 2021

Use StringComparer.OrdinalIgnoreCase when sorting query params

To add some more detail, query params need to be sorted by their "character code point".

Sort the parameter names by character code point in ascending order.

https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html

The internal AWS4Signer also uses the OrdinalIgnoreCase

https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Core/Amazon.Runtime/Internal/Auth/AWS4Signer.cs#L843-L850

Use `StringComparer.Ordinal` when sorting query params
@tsibelman
Copy link
Owner

Please update version number as well.

@branch-slalom
Copy link
Contributor Author

@tsibelman Updated the version number in the csproj. Thanks for the quick response!

Change Comparer to use `OrdinalIgnoreCase` (to align with AWS Internal signer)
@branch-slalom
Copy link
Contributor Author

@tsibelman Have you had a chance to look at the changes? Was hoping to have this merged sooner rather than later

@tsibelman tsibelman merged commit 15407fa into tsibelman:master Apr 8, 2021
@tsibelman
Copy link
Owner

Hi published the nuget

@branch-slalom
Copy link
Contributor Author

Hi published the nuget

Thanks!

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.

2 participants