mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-14 23:47:00 +03:00
Fixed bugs where normal users could cirumvent vip locks by changing categories
This commit is contained in:
@@ -180,14 +180,14 @@ async function categoryVote(UUID: SegmentUUID, userID: UserID, isVIP: boolean, i
|
||||
const nextCategoryLocked = await db.prepare("get", `SELECT "videoID", "category" FROM "lockCategories" WHERE "videoID" = ? AND "category" = ?`, [videoInfo.videoID, category]);
|
||||
if (nextCategoryLocked) {
|
||||
if (!isVIP) {
|
||||
return res.status(200);
|
||||
return res.sendStatus(200);
|
||||
} // In an else statement, add a warning in the future for VIPs, that the next category is locked
|
||||
}
|
||||
|
||||
// Ignore vote if the segment is locked
|
||||
if (!isVIP && videoInfo.locked === 1) {
|
||||
console.log("dalfäkjsdöfbsdfoöjasdökjb");
|
||||
return res.status(200);
|
||||
return res.sendStatus(200);
|
||||
}
|
||||
|
||||
const nextCategoryInfo = await db.prepare("get", `select votes from "categoryVotes" where "UUID" = ? and category = ?`, [UUID, category]);
|
||||
|
||||
Reference in New Issue
Block a user