From a4d398ef1bfeb316c32215080d5ae810b00c48ec Mon Sep 17 00:00:00 2001 From: Gronod Date: Thu, 28 May 2026 17:40:33 +0100 Subject: [PATCH] fix(webhooks): correct Ombi isReplay() call after signature change (closes #70) --- server/routes/webhook.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/routes/webhook.js b/server/routes/webhook.js index 41bcc89..4629850 100644 --- a/server/routes/webhook.js +++ b/server/routes/webhook.js @@ -813,10 +813,10 @@ router.post('/ombi', webhookLimiter, (req, res) => { // Use applicationUrl as instance identifier for replay protection const instanceName = applicationUrl || 'ombi'; - // Use requestId + eventType + current time as replay key const eventDate = req.body.requestedDate || req.body.RequestedDate || new Date().toISOString(); + const contentId = requestId || null; - if (isReplay(eventType, instanceName, `${requestId}-${eventDate}`)) { + if (isReplay(eventType, instanceName, eventDate, contentId)) { logToFile(`[Webhook] Ombi duplicate event ignored: ${eventType} requestId=${requestId}`); return res.status(200).json({ received: true, duplicate: true }); }