mirror of
https://github.com/pgsty/minio.git
synced 2026-08-11 08:43:28 +03:00
presignV4: fix errors response and tests. (#2375)
- Fix error response when one of the query params in the presign URL is missing. - Exhasutive test coverage for presignv4.
This commit is contained in:
committed by
Harshavardhana
parent
2a920e568c
commit
e0cf4ee9fc
@@ -95,8 +95,10 @@ func calculateSeedSignature(r *http.Request) (signature string, date time.Time,
|
||||
}
|
||||
|
||||
// Extract all the signed headers along with its values.
|
||||
extractedSignedHeaders := extractSignedHeaders(signV4Values.SignedHeaders, req.Header)
|
||||
|
||||
extractedSignedHeaders, errCode := extractSignedHeaders(signV4Values.SignedHeaders, req.Header)
|
||||
if errCode != ErrNone {
|
||||
return "", time.Time{}, errCode
|
||||
}
|
||||
// Verify if the access key id matches.
|
||||
if signV4Values.Credential.accessKey != cred.AccessKeyID {
|
||||
return "", time.Time{}, ErrInvalidAccessKeyID
|
||||
|
||||
Reference in New Issue
Block a user