mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 03:26:59 +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);
|
||||
endTime = parseFloat(endTime);
|
||||
|
||||
if (startTime > endTime) {
|
||||
//time can't go backwards
|
||||
res.sendStatus(400);
|
||||
}
|
||||
|
||||
//this can just be a hash of the data
|
||||
//it's better than generating an actual UUID like what was used before
|
||||
//also better for duplication checking
|
||||
|
||||
Reference in New Issue
Block a user