Skip to content

Commit 6faf37c

Browse files
authored
remove trailing slash in x-amz-credential for s3 presigned post (#4081)
1 parent 6147c3f commit 6faf37c

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"services": [
3+
{
4+
"serviceName": "S3",
5+
"type": "patch",
6+
"changeLogMessages": [
7+
"Remove trailing slash in x-amz-credential for presigned post"
8+
]
9+
}
10+
]
11+
}

sdk/src/Services/S3/Custom/Util/S3PostUploadSignedPolicy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ internal static S3PostUploadSignedPolicy GetSignedPolicy(string policy, Immutabl
120120
var algorithm = "AWS4-HMAC-SHA256";
121121
var dateStamp = Runtime.Internal.Auth.AWS4Signer.FormatDateTime(signedAt, AWSSDKUtils.ISO8601BasicDateFormat);
122122
var dateTimeStamp = Runtime.Internal.Auth.AWS4Signer.FormatDateTime(signedAt, AWSSDKUtils.ISO8601BasicDateTimeFormat);
123-
var credentialString = string.Format(CultureInfo.InvariantCulture, "{0}/{1}/{2}/{3}/{4}/", iCreds.AccessKey, dateStamp, region, "s3", Runtime.Internal.Auth.AWS4Signer.Terminator);
123+
var credentialString = string.Format(CultureInfo.InvariantCulture, "{0}/{1}/{2}/{3}/{4}", iCreds.AccessKey, dateStamp, region, "s3", Runtime.Internal.Auth.AWS4Signer.Terminator);
124124

125125
Dictionary<string, string> extraConditions = new Dictionary<string, string> {
126126
{ S3Constants.PostFormDataXAmzCredential, credentialString },

0 commit comments

Comments
 (0)