mirror of
https://github.com/minio/minio.git
synced 2026-02-04 18:00:15 -05:00
signature-v4: stringToSign and signingKey should use Scope's date. (#3688)
fixes #3676
This commit is contained in:
committed by
Harshavardhana
parent
93fd269329
commit
45d9cfa0c5
@@ -34,6 +34,16 @@ type credentialHeader struct {
|
||||
}
|
||||
}
|
||||
|
||||
// Return scope string.
|
||||
func (c credentialHeader) getScope() string {
|
||||
return strings.Join([]string{
|
||||
c.scope.date.Format(yyyymmdd),
|
||||
c.scope.region,
|
||||
c.scope.service,
|
||||
c.scope.request,
|
||||
}, "/")
|
||||
}
|
||||
|
||||
// parse credentialHeader string into its structured form.
|
||||
func parseCredentialHeader(credElement string) (credentialHeader, APIErrorCode) {
|
||||
creds := strings.Split(strings.TrimSpace(credElement), "=")
|
||||
|
||||
Reference in New Issue
Block a user