mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix content-sha256 verification for presigned PUT (#5137)
It is possible that x-amz-content-sha256 is set through the query params in case of presigned PUT calls, make sure that we validate the incoming x-amz-content-sha256 properly. Current code simply just allows this without honoring the set x-amz-content-sha256, fix it.
This commit is contained in:
committed by
Nitish Tiwari
parent
dcdb07433a
commit
719f8c258a
@@ -289,7 +289,7 @@ func doesPresignedSignatureMatch(hashedPayload string, r *http.Request, region s
|
||||
/// Verify finally if signature is same.
|
||||
|
||||
// Get canonical request.
|
||||
presignedCanonicalReq := getCanonicalRequest(extractedSignedHeaders, hashedPayload, encodedQuery, req.URL.Path, req.Method)
|
||||
presignedCanonicalReq := getCanonicalRequest(extractedSignedHeaders, unsignedPayload, encodedQuery, req.URL.Path, req.Method)
|
||||
|
||||
// Get string to sign from canonical request.
|
||||
presignedStringToSign := getStringToSign(presignedCanonicalReq, t, pSignValues.Credential.getScope())
|
||||
|
||||
Reference in New Issue
Block a user