mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-10 05:27:00 +03:00
Prevented backwards sponsor times.
This commit is contained in:
5
index.js
5
index.js
@@ -109,6 +109,11 @@ app.get('/api/postVideoSponsorTimes', function (req, res) {
|
|||||||
startTime = parseFloat(startTime);
|
startTime = parseFloat(startTime);
|
||||||
endTime = parseFloat(endTime);
|
endTime = parseFloat(endTime);
|
||||||
|
|
||||||
|
if (startTime > endTime) {
|
||||||
|
//time can't go backwards
|
||||||
|
res.sendStatus(400);
|
||||||
|
}
|
||||||
|
|
||||||
//this can just be a hash of the data
|
//this can just be a hash of the data
|
||||||
//it's better than generating an actual UUID like what was used before
|
//it's better than generating an actual UUID like what was used before
|
||||||
//also better for duplication checking
|
//also better for duplication checking
|
||||||
|
|||||||
Reference in New Issue
Block a user