JCLOUDS-1640: Use raw query to sign S3 V2 request

This prevents errors when listing objects with % in the key names.
Found via S3Proxy AwsSdkTest.testSpecialCharacters.
This commit is contained in:
Andrew Gaul 2024-12-22 17:30:34 -05:00
parent 176d3d44a8
commit 07a4ed72cc
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ public class RequestAuthorizeSignatureV2 implements RequestAuthorizeSignature, R
// ...however, there are a few exceptions that must be included in the
// signed URI.
if (request.getEndpoint().getQuery() != null) {
Multimap<String, String> params = queryParser().apply(request.getEndpoint().getQuery());
Multimap<String, String> params = queryParser().apply(request.getEndpoint().getRawQuery());
char separator = '?';
for (String paramName : Ordering.natural().sortedCopy(params.keySet())) {
// Skip any parameters that aren't part of the canonical signed string