Validate empty regex password policy with white-space characters (#22807)
Closes #20411 Signed-off-by: Pedro Hos <pedro-hos@outlook.com>
This commit is contained in:
parent
6b6f3fcf05
commit
2180d50b18
1 changed files with 2 additions and 0 deletions
|
@ -57,6 +57,8 @@ public class RegexPatternsPasswordPolicyProvider implements PasswordPolicyProvid
|
|||
public Object parseConfig(String value) {
|
||||
if (value == null) {
|
||||
throw new PasswordPolicyConfigException("Config required");
|
||||
} else if(value.trim().isEmpty()) {
|
||||
throw new PasswordPolicyConfigException("White space not acepted");
|
||||
}
|
||||
try {
|
||||
return Pattern.compile(value);
|
||||
|
|
Loading…
Reference in a new issue