Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Fix signature calculation for URL encoded characters #298

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public Response intercept(Chain chain) throws IOException {

// Endpoint requires signing the payload
if (isSignatureRequired) {
String payload = original.url().query();
String payload = original.url().encodedQuery();
if (!StringUtils.isEmpty(payload)) {
String signature = HmacSHA256Signer.sign(payload, secret);
HttpUrl signedUrl = original.url().newBuilder().addQueryParameter("signature", signature).build();
Expand Down