refactor(web): adjust special char regex (#4082)
This adjusts the special character regex to consider all characters which are not alphanumeric as special, including the underscore.pull/4087/head
parent
e508b7458a
commit
ff13fe65a1
|
@ -77,7 +77,7 @@ const PasswordMeter = function (props: Props) {
|
||||||
|
|
||||||
if (props.policy.require_special) {
|
if (props.policy.require_special) {
|
||||||
required++;
|
required++;
|
||||||
const hasSpecial = /[^0-9\w]/i.test(password);
|
const hasSpecial = /[^a-z0-9]/i.test(password);
|
||||||
if (hasSpecial) {
|
if (hasSpecial) {
|
||||||
hits++;
|
hits++;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue