From cbfbc38f100fa53af5d8d5b9998056d29b3af5a1 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Tue, 6 Jun 2023 20:36:46 -0400 Subject: [PATCH] fix(striker-ui-api): remove slashes from rand password in create user --- striker-ui-api/src/lib/request_handlers/user/createUser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/striker-ui-api/src/lib/request_handlers/user/createUser.ts b/striker-ui-api/src/lib/request_handlers/user/createUser.ts index 29f9db05..ecf8bcc9 100644 --- a/striker-ui-api/src/lib/request_handlers/user/createUser.ts +++ b/striker-ui-api/src/lib/request_handlers/user/createUser.ts @@ -15,7 +15,7 @@ export const createUser: RequestHandler< const { body: { password: rPassword, userName: rUserName } = {} } = request; const password = sanitize(rPassword, 'string', { - fallback: openssl('rand', '-base64', '12').trim(), + fallback: openssl('rand', '-base64', '12').trim().replaceAll('/', '!'), }); const userName = sanitize(rUserName, 'string', { modifierType: 'sql' });