From 0f589b0e5bc131c8ccff2fec6aa243e168bd200a Mon Sep 17 00:00:00 2001 From: Miodec Date: Tue, 8 Nov 2022 12:45:17 +0100 Subject: [PATCH] allowing .-_ in github and twitter names closes #3729 --- backend/src/api/routes/users.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/api/routes/users.ts b/backend/src/api/routes/users.ts index d087651f6..52b0b3d3e 100644 --- a/backend/src/api/routes/users.ts +++ b/backend/src/api/routes/users.ts @@ -462,8 +462,8 @@ router.patch( keyboard: profileDetailsBase.max(75), selectedBadgeId: joi.number(), socialProfiles: joi.object({ - twitter: profileDetailsBase.alphanum().max(20), - github: profileDetailsBase.alphanum().max(39), + twitter: profileDetailsBase.regex(/^[0-9a-zA-Z_.-]+$/).max(20), + github: profileDetailsBase.regex(/^[0-9a-zA-Z_.-]+$/).max(39), website: profileDetailsBase .uri({ scheme: "https",