mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-14 23:47:00 +03:00
Don't allow Infinity to be passed into the database as a sponsor time.
This commit is contained in:
6
index.js
6
index.js
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user