mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 06:00:24 +03:00
fix X-Amz-Credential parsing for V4 policy signature (#6451)
This commit fixes an AWS S3 incompatibility issue. The AccessKeyID may contain one or more `/` which caused the server to interpret parts of the AccessKeyID as other `X-Amz-Credential` parameters (like date, region, ...) This commit fixes this by allowing 5 or more `X-Amz-Credential` parameter strings and only interpreting the last 5. Fixes #6443
This commit is contained in:
committed by
kannappanr
parent
985fd7d4e7
commit
267a0a3dfa
@@ -197,6 +197,25 @@ func TestParseCredentialHeader(t *testing.T) {
|
||||
"aws4_request"),
|
||||
expectedErrCode: ErrNone,
|
||||
},
|
||||
// Test Case - 10.
|
||||
// Test case with right inputs -> AccessKey contains `/`. See minio/#6443
|
||||
// "aws4_request" is the valid request version.
|
||||
{
|
||||
inputCredentialStr: generateCredentialStr(
|
||||
"LOCALKEY/DEV/1",
|
||||
sampleTimeStr,
|
||||
"us-west-1",
|
||||
"s3",
|
||||
"aws4_request"),
|
||||
expectedCredentials: generateCredentials(
|
||||
t,
|
||||
"LOCALKEY/DEV/1",
|
||||
sampleTimeStr,
|
||||
"us-west-1",
|
||||
"s3",
|
||||
"aws4_request"),
|
||||
expectedErrCode: ErrNone,
|
||||
},
|
||||
}
|
||||
|
||||
for i, testCase := range testCases {
|
||||
|
||||
Reference in New Issue
Block a user