|
|
|
@ -232,8 +232,7 @@ public class DefaultSystemSecurityService implements SystemSecurityService { |
|
|
|
JsonNode additionalInfo = user.getAdditionalInfo(); |
|
|
|
if (additionalInfo instanceof ObjectNode && additionalInfo.has(UserServiceImpl.USER_PASSWORD_HISTORY)) { |
|
|
|
JsonNode userPasswordHistoryJson = additionalInfo.get(UserServiceImpl.USER_PASSWORD_HISTORY); |
|
|
|
Map<String, String> userPasswordHistoryMap = JacksonUtil.convertValue(userPasswordHistoryJson, new TypeReference<>() { |
|
|
|
}); |
|
|
|
Map<String, String> userPasswordHistoryMap = JacksonUtil.convertValue(userPasswordHistoryJson, new TypeReference<>() {}); |
|
|
|
for (Map.Entry<String, String> entry : userPasswordHistoryMap.entrySet()) { |
|
|
|
if (encoder.matches(password, entry.getValue()) && Long.parseLong(entry.getKey()) > passwordReuseFrequencyTs) { |
|
|
|
throw new DataValidationException("Password was already used for the last " + passwordPolicy.getPasswordReuseFrequencyDays() + " days"); |
|
|
|
|