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
James Elliott 2022-09-26 22:06:48 +10:00 committed by GitHub
parent e508b7458a
commit ff13fe65a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ const PasswordMeter = function (props: Props) {
if (props.policy.require_special) {
required++;
const hasSpecial = /[^0-9\w]/i.test(password);
const hasSpecial = /[^a-z0-9]/i.test(password);
if (hasSpecial) {
hits++;
} else {