mirror of
https://github.com/minio/minio.git
synced 2025-11-29 13:28:17 -05:00
signature: Handle presigned payload if set.
Validate payload with incoming content. Fixes #1288
This commit is contained in:
committed by
Anand Babu (AB) Periasamy
parent
4e6c4da518
commit
b182e94acc
@@ -24,7 +24,7 @@ import (
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/minio/minio/pkg/crypto/sha256"
|
||||
fastSha256 "github.com/minio/minio/pkg/crypto/sha256"
|
||||
)
|
||||
|
||||
// isValidRegion - verify if incoming region value is valid with configured Region.
|
||||
@@ -42,7 +42,7 @@ func isValidRegion(reqRegion string, confRegion string) bool {
|
||||
|
||||
// sumHMAC calculate hmac between two input byte array.
|
||||
func sumHMAC(key []byte, data []byte) []byte {
|
||||
hash := hmac.New(sha256.New, key)
|
||||
hash := hmac.New(fastSha256.New, key)
|
||||
hash.Write(data)
|
||||
return hash.Sum(nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user