mirror of
https://github.com/minio/minio.git
synced 2025-03-02 14:59:13 -05:00
web: Encode path in presigned GET urls (#4596)
When the browser asks for a GET presigned url, this latter is not encoded and can be confusing when the user copies-pastes it somewhere, especially when the path contains a space.
This commit is contained in:
parent
1054f9cbf0
commit
c88dca984d
@ -919,7 +919,7 @@ func presignedGet(host, bucket, object string, expiry int64) string {
|
||||
signature := getSignature(signingKey, stringToSign)
|
||||
|
||||
// Construct the final presigned URL.
|
||||
return host + path + "?" + query + "&" + "X-Amz-Signature=" + signature
|
||||
return host + getURLEncodedName(path) + "?" + query + "&" + "X-Amz-Signature=" + signature
|
||||
}
|
||||
|
||||
// toJSONError converts regular errors into more user friendly
|
||||
|
Loading…
x
Reference in New Issue
Block a user