mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-15 07:57:05 +03:00
Merge pull request #63 from Joe-Dowd/more-sponsortime-checks
Bug Fix: 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