mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
presign-v2: Compute signature on encoded URL path (#3612)
Encode the path of the passed presigned url before calculating the signature. This fixes presigning objects whose names contain characters that are found encoded in urls.
This commit is contained in:
parent
586058f079
commit
e1f64141a2
@ -92,9 +92,10 @@ func doesPresignV2SignatureMatch(r *http.Request) APIErrorCode {
|
||||
if encodedResource == "" {
|
||||
splits := strings.Split(r.URL.Path, "?")
|
||||
if len(splits) > 0 {
|
||||
encodedResource = splits[0]
|
||||
encodedResource = getURLEncodedName(splits[0])
|
||||
}
|
||||
}
|
||||
|
||||
queries := strings.Split(encodedQuery, "&")
|
||||
var filteredQueries []string
|
||||
var gotSignature string
|
||||
|
Loading…
Reference in New Issue
Block a user