Skip to content

Commit 92c0a67

Browse files
author
Dmytro Vyshnevskyi
committed
cs fix + change log
1 parent b0154ba commit 92c0a67

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Core/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Fixed
6+
- SignerV4: sort canonical query parameters **after** URI-encoding (per AWS SigV4). Fixes incorrect ordering for array-style keys (e.g., `transaction_ids[10]` vs `transaction_ids[1]`), which could cause `The request signature we calculated does not match the signature you provided`. See: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-create-signed-request.html
7+
8+
59
## 1.27.0
610

711
### Added

src/Core/src/Signer/SignerV4.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ private function buildCanonicalQuery(Request $request): string
321321
return '';
322322
}
323323

324-
uksort($query, static fn($a, $b) => strcmp(rawurlencode($a), rawurlencode($b)));
324+
uksort($query, static fn ($a, $b) => strcmp(rawurlencode($a), rawurlencode($b)));
325325
$encodedQuery = [];
326326
foreach ($query as $key => $values) {
327327
if (!\is_array($values)) {

0 commit comments

Comments
 (0)