Skip to content

Commit 803614d

Browse files
committed
Fixing changelog description and implementation to use TrimSpace
1 parent b12c8cf commit 803614d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.changelog/f63b26b19e2e4330b4240f38088453ea.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "f63b26b1-9e2e-4330-b424-0f38088453ea",
33
"type": "bugfix",
4-
"description": "Adding logic to omit whitespaces in the signature, and test coverage",
4+
"description": "Improve handling of whitespace (or lack thereof) in sigv4 GetSignedRequestSignature.",
55
"modules": [
66
"."
77
]

aws/signer/v4/middleware.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ func GetSignedRequestSignature(r *http.Request) ([]byte, error) {
374374
if auth := r.Header.Get(authorizationHeader); len(auth) != 0 {
375375
ps := strings.Split(auth, ",")
376376
for _, p := range ps {
377-
p = strings.Trim(p, " ")
377+
p = strings.TrimSpace(p)
378378
if idx := strings.Index(p, authHeaderSignatureElem); idx >= 0 {
379379
sig := p[len(authHeaderSignatureElem):]
380380
if len(sig) == 0 {

0 commit comments

Comments
 (0)