From 5bf86ca7bf587a4fcee4172cb241ed0512afb211 Mon Sep 17 00:00:00 2001 From: Joe Dowd Date: Wed, 18 Mar 2020 02:25:37 +0000 Subject: [PATCH] Don't allow Infinity to be passed into the database as a sponsor time. --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index c1f0711..c3b00f7 100644 --- a/index.js +++ b/index.js @@ -167,6 +167,12 @@ async function submitSponsorTimes(req, res) { return; } + if (startTime === Infinity || endTime === Infinity) { + //invalid request + res.sendStatus(400); + return; + } + if (startTime > endTime) { //time can't go backwards res.sendStatus(400);