set limit of 64 characters for lookup

This commit is contained in:
Michael C
2021-06-25 11:57:27 -04:00
parent f29bafe89a
commit 09ab1dabdf
2 changed files with 21 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ import {Request, Response} from 'express';
export async function getUserID(req: Request, res: Response) {
let username = req.query.username as string;
if (username == undefined) {
if (username == undefined || username.length > 64) {
//invalid request
res.sendStatus(400);
return;