Don't allow Infinity to be passed into the database as a sponsor time.

This commit is contained in:
Joe Dowd
2020-03-18 02:25:37 +00:00
parent 67bbce0b07
commit 5bf86ca7bf

View File

@@ -167,6 +167,12 @@ async function submitSponsorTimes(req, res) {
return; return;
} }
if (startTime === Infinity || endTime === Infinity) {
//invalid request
res.sendStatus(400);
return;
}
if (startTime > endTime) { if (startTime > endTime) {
//time can't go backwards //time can't go backwards
res.sendStatus(400); res.sendStatus(400);