fix symbols allowed for password + update tests

pull/1743/head
Audric Ackermann 3 years ago
parent 10702088e2
commit 50d4481672
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -40,6 +40,7 @@ describe('Password Util', () => {
'TiJf@lk^jsO^z8MUn%)[Sd~UPQ)ci9CGS@jb<^',
'$u&%{r]apg#G@3dQdCkB_p8)gxhNFr=K&yfM_M8O&2Z.vQyvx',
'bf^OMnYku*iX;{Piw_0zvz',
'@@@@/???\\4545',
'#'.repeat(50),
];
valid.forEach(pass => {

@ -33,7 +33,7 @@ export const validatePassword = (phrase: string) => {
}
// Restrict characters to letters, numbers and symbols
const characterRegex = /^[a-zA-Z0-9-!()._`~@#$%^&*+=[\]{}|<>,;: ]+$/;
const characterRegex = /^[a-zA-Z0-9-!?/\\()._`~@#$%^&*+=[\]{}|<>,;: ]+$/;
if (!characterRegex.test(trimmed)) {
return window?.i18n ? window?.i18n('passwordCharacterError') : ERRORS.CHARACTER;
}

Loading…
Cancel
Save