sureshanaparti commented on code in PR #8370:
URL: https://github.com/apache/cloudstack/pull/8370#discussion_r1431461537
##########
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:
Hi @JoaoJandre Does the _password.policy.regex_ setting update checks the
existing users password match (at sometime, may be login), and enforces user
with non matching password to change the password immediately or after certain
grace period?
--
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]