fix(striker-ui-api): remove slashes from rand password in create user

main
Tsu-ba-me 2 years ago
parent 75068c1957
commit cbfbc38f10
  1. 2
      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 { body: { password: rPassword, userName: rUserName } = {} } = request;
const password = sanitize(rPassword, 'string', { 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' }); const userName = sanitize(rUserName, 'string', { modifierType: 'sql' });

Loading…
Cancel
Save