Accept spaced CoinPay signature parts (#17)

This commit is contained in:
Autowebassat-blip 2026-06-12 06:04:41 +02:00 committed by GitHub
parent d558554da3
commit 9ed98ceaf7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -409,6 +409,7 @@ describe("POST /api/webhooks/coinpay", () => {
const signature = createHmac("sha256", secret).update(`${timestamp}.${payload}`).digest("hex");
expect(verifyCoinPayWebhook(payload, `t=${timestamp},v1=${signature}`, secret)).toBe(true);
expect(verifyCoinPayWebhook(payload, `t=${timestamp}, v1=${signature}`, secret)).toBe(true);
const response = await coinpayWebhook(
new NextRequest("http://localhost/api/webhooks/coinpay", {