From 0ac5286c7603d8be32623dec7b39ba8221c82c42 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 11 Jan 2026 07:09:51 +0000 Subject: [PATCH] Increase ping validation limit to 100 billion ms (~3.17 years) Co-authored-by: CommanderStorm <26258709+CommanderStorm@users.noreply.github.com> --- server/routers/api-router.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/routers/api-router.js b/server/routers/api-router.js index 742cd577d..05c953756 100644 --- a/server/routers/api-router.js +++ b/server/routers/api-router.js @@ -52,9 +52,9 @@ router.all("/api/push/:pushToken", async (request, response) => { let statusString = request.query.status || "up"; const statusFromParam = statusString === "up" ? UP : DOWN; - // Validate ping value - max 1 billion ms (~11.5 days) + // Validate ping value - max 100 billion ms (~3.17 years) // Fits safely in both BIGINT and FLOAT(20,2) - const MAX_PING_MS = 1000000000; + const MAX_PING_MS = 100000000000; if (ping !== null && (ping < 0 || ping > MAX_PING_MS)) { throw new Error(`Invalid ping value. Must be between 0 and ${MAX_PING_MS} ms.`); }