mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-08-13 22:37:29 +00:00
Reject malformed CoinPay webhook signatures (#41)
* Reject malformed CoinPay webhook signatures * Fix webhook signature type guard --------- Co-authored-by: Codex Microtask Operator <codex-microtask@example.com>
This commit is contained in:
parent
055cc09d14
commit
e89c10cc80
2 changed files with 2 additions and 1 deletions
|
|
@ -433,6 +433,7 @@ describe("POST /api/webhooks/coinpay", () => {
|
|||
|
||||
expect(verifyCoinPayWebhook(payload, `t=${timestamp},v1=${signature}`, secret)).toBe(true);
|
||||
expect(verifyCoinPayWebhook(payload, `t=${timestamp}, v1=${signature}`, secret)).toBe(true);
|
||||
expect(verifyCoinPayWebhook(payload, `t=${timestamp},v1=${signature}0`, secret)).toBe(false);
|
||||
|
||||
const response = await coinpayWebhook(
|
||||
new NextRequest("http://localhost/api/webhooks/coinpay", {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue