Skip to content

Commit

Permalink
Fixing changelog description and implementation to use TrimSpace
Browse files Browse the repository at this point in the history
  • Loading branch information
RanVaknin committed Oct 28, 2024
1 parent b12c8cf commit 803614d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .changelog/f63b26b19e2e4330b4240f38088453ea.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "f63b26b1-9e2e-4330-b424-0f38088453ea",
"type": "bugfix",
"description": "Adding logic to omit whitespaces in the signature, and test coverage",
"description": "Improve handling of whitespace (or lack thereof) in sigv4 GetSignedRequestSignature.",
"modules": [
"."
]
Expand Down
2 changes: 1 addition & 1 deletion aws/signer/v4/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ func GetSignedRequestSignature(r *http.Request) ([]byte, error) {
if auth := r.Header.Get(authorizationHeader); len(auth) != 0 {
ps := strings.Split(auth, ",")
for _, p := range ps {
p = strings.Trim(p, " ")
p = strings.TrimSpace(p)
if idx := strings.Index(p, authHeaderSignatureElem); idx >= 0 {
sig := p[len(authHeaderSignatureElem):]
if len(sig) == 0 {
Expand Down

0 comments on commit 803614d

Please sign in to comment.