mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-14 07:27:01 +03:00
Add a minimum size to userID when submitting
This commit is contained in:
@@ -340,7 +340,7 @@ export async function postSkipSegments(req: Request, res: Response): Promise<Res
|
||||
if (typeof videoID !== 'string') {
|
||||
invalidFields.push('videoID');
|
||||
}
|
||||
if (typeof userID !== 'string') {
|
||||
if (typeof userID !== 'string' || userID.length < 30) {
|
||||
invalidFields.push('userID');
|
||||
}
|
||||
if (!Array.isArray(segments) || segments.length < 1) {
|
||||
|
||||
Reference in New Issue
Block a user