JoaoJandre commented on code in PR #8370:
URL: https://github.com/apache/cloudstack/pull/8370#discussion_r1431678598
##########
server/src/main/java/com/cloud/user/PasswordPolicyImpl.java:
##########
@@ -188,12 +188,12 @@ protected void validateIfPasswordMatchesRegex(String
password, String username,
logger.trace(String.format("Validating if the new password for user
[%s] matches regex [%s] defined in the configuration [%s].",
username, passwordPolicyRegex, PasswordPolicyRegex.key()));
- if (passwordPolicyRegex == null){
+ if (StringUtils.isBlank(passwordPolicyRegex)) {
logger.trace(String.format("Regex is null; therefore, we will not
validate if the new password matches with regex for user [%s].", username));
return;
}
- if (!password.matches(passwordPolicyRegex)){
+ if (!password.matches(passwordPolicyRegex)) {
Review Comment:
@sureshanaparti All the password policies are applied only on user/account
creation or password change. They are not validated on log in.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]