Skip to content

Commit

Permalink
Merge pull request #16 from fmasuhr/patch-1
Browse files Browse the repository at this point in the history
Fix duplicated use of variable names in signed header lookup
  • Loading branch information
badslug authored May 3, 2017
2 parents 1c1e5f2 + f1ede79 commit 0c4607b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions AWSSignature4DynamicValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,10 @@ var AWSSignature4DynamicValue = function() {

// Search for other signed headers to include. We will assume any headers that begin with X-Amz-<*> will be included
var signedHeaders = 'host;x-amz-date'
var headers = request.getHeadersArray()
if (headers) {
headers.forEach(function(header) {
var headers = '' // The actual headers to sign
var headersArray = request.getHeadersArray()
if (headersArray) {
headersArray.forEach(function(header) {
var lower = header.name.getEvaluatedString().toLowerCase()
if (lower !== 'x-amz-date' && lower.startsWith('x-amz-')) {
signedHeaders += ';'+lower
Expand Down

0 comments on commit 0c4607b

Please sign in to comment.