Skip to content
Snippets Groups Projects
Commit c4290c28 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

fix for special chars regex.

parent 79057e23
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ var MetabaseUtils = {
var uc = password.match(/([A-Z])/g);
var lc = password.match(/([a-z])/g);
var di = password.match(/([\d])/g);
var sc = password.match(/([\?\-])/g);
var sc = password.match(/([!@#\$%\^\&*\)\(+=._-{}])/g);
return (uc && uc.length >= (complexity.upper || 0) &&
lc && lc.length >= (complexity.lower || 0) &&
......
......@@ -48,7 +48,7 @@ describe('utils', () => {
it('can enforce special character requirements', () => {
expect(
(MetabaseUtils.generatePassword(14, {special: 2}).match(/([\?\-])/g).length >= 2)
(MetabaseUtils.generatePassword(14, {special: 2}).match(/([!@#\$%\^\&*\)\(+=._-{}])/g).length >= 2)
).toBe(
true
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment