Cannot change password when maxPasswordHistory is 1#5191
Cannot change password when maxPasswordHistory is 1#5191acinader merged 3 commits intoparse-community:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5191 +/- ##
==========================================
+ Coverage 93.93% 93.97% +0.03%
==========================================
Files 123 124 +1
Lines 8975 9050 +75
==========================================
+ Hits 8431 8505 +74
- Misses 544 545 +1
Continue to review full report at Codecov.
|
flovilmart
left a comment
There was a problem hiding this comment.
Can you add a test please?
|
Thanks for the PR, can you add a test please so we do not introduce unwanted regressions? |
|
@paulovitin @flovilmart @paulovitin pointed out the case covered here, but It seems that when the password is invalid then we will not rich the problem. Your help will be greatly appreciated 😀 |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
cc @Tolsee do you think you can add a test please? |
|
@acinader The issue here is that new users have a password history of 0 initially which causes an infinite loop. Failing test has been added |
…5191) * Negitive to zero and positive to same value * add failing test
#4918
Change
this.config.passwordPolicy.maxPasswordHistory - 2to equal 0 when 0 or -ve, same value when positive.So, while loop will terminate.