Skip to content

Commit

Permalink
Merge pull request #27 from port-labs/PORT-8867-bug-agent-fails-valid…
Browse files Browse the repository at this point in the history
…ation-for-actions

remove ensure ascii flags from json stringify to match js stringify
  • Loading branch information
Tomer-Buhadana-Port authored Jul 4, 2024
2 parents ac28fa8 + 1e96576 commit e8f8abd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/invokers/webhook_invoker.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,8 @@ def validate_incoming_signature(self, msg: dict) -> bool:
# Remove the headers to avoid them being used in the signature verification
del msg["headers"]["X-Port-Signature"]
del msg["headers"]["X-Port-Timestamp"]

expected_sig = sign_sha_256(
json.dumps(msg, separators=(",", ":")),
json.dumps(msg, separators=(",", ":"), ensure_ascii=False),
settings.PORT_CLIENT_SECRET,
port_timestamp,
)
Expand Down

0 comments on commit e8f8abd

Please sign in to comment.