Ignore votes from short ids

This commit is contained in:
Ajay Ramachandran
2021-07-16 16:22:55 -04:00
parent 3f6baebd71
commit b98d6fd8ca

View File

@@ -258,6 +258,10 @@ export async function voteOnSponsorTime(req: Request, res: Response): Promise<Re
//invalid request
return res.sendStatus(400);
}
if (paramUserID.length < 30 && config.mode !== "test") {
// Ignore this vote, invalid
return res.sendStatus(200);
}
//hash the userID
const nonAnonUserID = getHash(paramUserID);