mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-08-15 07:17:30 +00:00
Reject malformed CoinPay webhook signatures
This commit is contained in:
parent
8f4691584c
commit
d60ceab6c2
2 changed files with 2 additions and 1 deletions
|
|
@ -410,6 +410,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