adamsaghy commented on code in PR #5367:
URL: https://github.com/apache/fineract/pull/5367#discussion_r2721120552
##########
fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserWritePlatformServiceJpaRepositoryImpl.java:
##########
@@ -269,12 +270,15 @@ private AppUserPreviousPassword
getCurrentPasswordToSaveAsPreview(final AppUser
AppUserPreviousPassword currentPasswordToSaveAsPreview = null;
if (passWordEncodedValue != null) {
- PageRequest pageRequest = PageRequest.of(0,
AppUserApiConstant.numberOfPreviousPasswords, Sort.Direction.DESC,
"removalDate");
- final List<AppUserPreviousPassword> nLastUsedPasswords =
this.appUserPreviewPasswordRepository.findByUserId(user.getId(),
- pageRequest);
- for (AppUserPreviousPassword aPreviewPassword :
nLastUsedPasswords) {
- if
(aPreviewPassword.getPassword().equals(passWordEncodedValue)) {
- throw new PasswordPreviouslyUsedException();
+ final Integer passwordReuseRestrictionCount =
this.configurationDomainService.getPasswordReuseRestrictionCount();
+ if (passwordReuseRestrictionCount != null) {
Review Comment:
if its enabled, but no value was provided, it is doing nothing which
contradicts with the purpose of this field!
--
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]