We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38506d1 commit 2b8a9e5Copy full SHA for 2b8a9e5
apps/sim/lib/webhooks/providers/resend.ts
@@ -49,6 +49,12 @@ function verifySvixSignature(
49
rawBody: string
50
): boolean {
51
try {
52
+ const ts = parseInt(timestamp, 10)
53
+ const now = Math.floor(Date.now() / 1000)
54
+ if (isNaN(ts) || Math.abs(now - ts) > 5 * 60) {
55
+ return false
56
+ }
57
+
58
const secretBytes = Buffer.from(secret.replace(/^whsec_/, ''), 'base64')
59
const toSign = `${msgId}.${timestamp}.${rawBody}`
60
const expectedSignature = crypto
0 commit comments