mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Fix signature v2 handling for resource names (#4965)
Previously we were wrongly adding `?` as part of the resource name, add a test case to check if this is handled properly. Thanks to @kannappanr for reproducing this. Without this change presigned URL generated with following command would fail with signature mismatch. ``` aws s3 presign s3://testbucket/functional-tests.sh ```
This commit is contained in:
committed by
Dee Koder
parent
0bf981278e
commit
6dcfaa877c
@@ -105,13 +105,18 @@ func TestDoesPresignedV2SignatureMatch(t *testing.T) {
|
||||
},
|
||||
expected: ErrSignatureDoesNotMatch,
|
||||
},
|
||||
// (6) Should error when the signature does not match.
|
||||
// (6) Should not error signature matches with extra query params.
|
||||
{
|
||||
queryParams: map[string]string{
|
||||
"response-content-disposition": "attachment; filename=\"4K%2d4M.txt\"",
|
||||
},
|
||||
expected: ErrNone,
|
||||
},
|
||||
// (7) Should not error signature matches with no special query params.
|
||||
{
|
||||
queryParams: map[string]string{},
|
||||
expected: ErrNone,
|
||||
},
|
||||
}
|
||||
|
||||
// Run each test case individually.
|
||||
|
||||
Reference in New Issue
Block a user