disallow underscores for names

This commit is contained in:
Nathaniel Tampus
2023-03-19 21:24:41 +08:00
parent 9ae628c592
commit dc2f218115
2 changed files with 3 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ export const guestSession = async (req: Request, res: Response) => {
try {
const name = xss(req.body.name);
const pattern = /^[A-Za-z0-9_]+$/;
const pattern = /^[A-Za-z0-9]+$/;
if (!pattern.test(name)) {
res.status(400).end();