Skip to content

Commit 78bec79

Browse files
committed
fix(triggers): make challenge signature verification mandatory, not optional
1 parent bd0a5aa commit 78bec79

File tree

1 file changed

+8
-6
lines changed
  • apps/sim/lib/webhooks/providers

1 file changed

+8
-6
lines changed

apps/sim/lib/webhooks/providers/zoom.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,14 @@ export const zoomHandler: WebhookProviderHandler = {
143143
// Verify the challenge request's signature to prevent HMAC oracle attacks
144144
const signature = request.headers.get('x-zm-signature')
145145
const timestamp = request.headers.get('x-zm-request-timestamp')
146-
if (signature && timestamp) {
147-
const rawBody = JSON.stringify(body)
148-
if (!validateZoomSignature(secretToken, signature, timestamp, rawBody)) {
149-
logger.warn(`[${requestId}] Zoom challenge request failed signature verification`)
150-
return null
151-
}
146+
if (!signature || !timestamp) {
147+
logger.warn(`[${requestId}] Zoom challenge request missing signature headers — rejecting`)
148+
return null
149+
}
150+
const rawBody = JSON.stringify(body)
151+
if (!validateZoomSignature(secretToken, signature, timestamp, rawBody)) {
152+
logger.warn(`[${requestId}] Zoom challenge request failed signature verification`)
153+
return null
152154
}
153155

154156
const hashForValidate = crypto

0 commit comments

Comments
 (0)