From c137a0f61046f15713fa907f4332ed1dc123dad4 Mon Sep 17 00:00:00 2001 From: VLE2FE Date: Thu, 14 May 2020 16:54:58 +0200 Subject: [PATCH] changed allowed characters for username --- src/routes/validate/user.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/validate/user.ts b/src/routes/validate/user.ts index 4472aa8..c146d7e 100644 --- a/src/routes/validate/user.ts +++ b/src/routes/validate/user.ts @@ -5,9 +5,9 @@ import IdValidate from './id'; export default class UserValidate { // validate input for user private static user = { - name: Joi.string() // TODO: check allowed characters - .alphanum() + name: Joi.string() .lowercase() + .pattern(new RegExp('^[a-z0-9-_.]+$')) .max(128), email: Joi.string()