From b8c25ecf6c948358d952f2749c693dbc311add18 Mon Sep 17 00:00:00 2001 From: branch-slalom Date: Mon, 29 Mar 2021 15:39:26 -0400 Subject: [PATCH 1/3] Update AWS4RequestSigner.cs Use `StringComparer.Ordinal` when sorting query params --- Aws4Signer/AWS4RequestSigner.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Aws4Signer/AWS4RequestSigner.cs b/Aws4Signer/AWS4RequestSigner.cs index 9d17ab0..2c2054b 100644 --- a/Aws4Signer/AWS4RequestSigner.cs +++ b/Aws4Signer/AWS4RequestSigner.cs @@ -151,7 +151,7 @@ public async Task Sign(HttpRequestMessage request, string se private static string GetCanonicalQueryParams(HttpRequestMessage request) { - var values = new SortedDictionary>(); + var values = new SortedDictionary>(StringComparer.Ordinal); var querystring = HttpUtility.ParseQueryString(request.RequestUri.Query); foreach (var key in querystring.AllKeys) @@ -183,4 +183,4 @@ public void Dispose() _sha256.Dispose(); } } -} \ No newline at end of file +} From c28d266363a5a35a21a89d535dbe8c0de6133997 Mon Sep 17 00:00:00 2001 From: branch-slalom Date: Mon, 29 Mar 2021 16:48:51 -0400 Subject: [PATCH 2/3] Update Aws4RequestSigner.csproj Bump nuget version --- Aws4Signer/Aws4RequestSigner.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Aws4Signer/Aws4RequestSigner.csproj b/Aws4Signer/Aws4RequestSigner.csproj index 76ded15..108e356 100644 --- a/Aws4Signer/Aws4RequestSigner.csproj +++ b/Aws4Signer/Aws4RequestSigner.csproj @@ -5,9 +5,9 @@ true - 1.0.1 - 1.0.1.0 - 1.0.1.0 + 1.0.2 + 1.0.2.0 + 1.0.2.0 https://github.com/tsibelman/aws-signer-v4-dot-net/blob/master/LICENSE https://github.com/tsibelman/aws-signer-v4-dot-net From 3f9f94e427ec20460ab9a981352eb55ca3b6c1cd Mon Sep 17 00:00:00 2001 From: branch-slalom Date: Mon, 29 Mar 2021 16:56:11 -0400 Subject: [PATCH 3/3] Update AWS4RequestSigner.cs Change Comparer to use `OrdinalIgnoreCase` (to align with AWS Internal signer) --- Aws4Signer/AWS4RequestSigner.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Aws4Signer/AWS4RequestSigner.cs b/Aws4Signer/AWS4RequestSigner.cs index 2c2054b..6a7a3ab 100644 --- a/Aws4Signer/AWS4RequestSigner.cs +++ b/Aws4Signer/AWS4RequestSigner.cs @@ -151,7 +151,7 @@ public async Task Sign(HttpRequestMessage request, string se private static string GetCanonicalQueryParams(HttpRequestMessage request) { - var values = new SortedDictionary>(StringComparer.Ordinal); + var values = new SortedDictionary>(StringComparer.OrdinalIgnoreCase); var querystring = HttpUtility.ParseQueryString(request.RequestUri.Query); foreach (var key in querystring.AllKeys)