mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-26 17:38:28 +03:00
Validity check
This commit is contained in:
@@ -108,6 +108,14 @@ export async function canSubmit(userID: HashedUserID, category: Category): Promi
|
||||
}
|
||||
}
|
||||
|
||||
export function validSubmittedData(userAgent: string): boolean {
|
||||
if (!config.validityCheck.userAgent) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return new RegExp(config.validityCheck.userAgent).test(userAgent);
|
||||
}
|
||||
|
||||
export async function canSubmitGlobal(userID: HashedUserID): Promise<CanSubmitGlobalResult> {
|
||||
const oldSubmitterOrAllowedPromise = oldSubmitterOrAllowed(userID);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user