Skip to content

Commit

Permalink
Merge pull request #36 from kaakaww/ejpotter009-patch-1
Browse files Browse the repository at this point in the history
Update aws-sigv4.kts
  • Loading branch information
ejpotter009 authored Dec 19, 2024
2 parents 5c3fc31 + 955d93b commit c8cef6d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/examples/httpsender/aws-sigv4.kts
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ fun sendingRequest(msg: HttpMessage, initiator: Int, helper: HttpSenderScriptHel
val host = msg.requestHeader.hostName
var canonicalQuerystring = ""

if (parsedUrl.query != "") {
var query = parsedUrl.query ?: ""
if (query != "") {
// Replace any + * from ZAP Payloads with %20/%2A - + * breaks signature
val query = parsedUrl.query
.replace("+", "%20")
query.replace("+", "%20")
.replace("*", "%2A")

// sort parameters
Expand Down Expand Up @@ -119,4 +119,4 @@ fun responseReceived(msg: HttpMessage, initiator: Int, helper: HttpSenderScriptH
logger.info("responseReceived function called")
logger.info("\n${msg.requestHeader}\n${msg.requestBody}")
logger.info("\n${msg.responseHeader}\n${msg.responseBody}")
}
}

0 comments on commit c8cef6d

Please sign in to comment.