Skip to content

Commit

Permalink
MID-8502 fixed freeze when entering long pwd to text field (caused by…
Browse files Browse the repository at this point in the history
… entropy calcuation)

(cherry picked from commit a13d7a0)
  • Loading branch information
1azyman committed Mar 3, 2023
1 parent 4dc7462 commit 2410ab3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
See git history for this package.

https://jira.evolveum.com/browse/MID-8502
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,13 @@
var value = 0;

if (password.length > 0) {
var score = new Score(password);
value = score.calculateEntropyScore(settings.passwordScore.options, settings.passwordScore.append);
if (password.length < 50) {
var score = new Score(password);
value = score.calculateEntropyScore(settings.passwordScore.options, settings.passwordScore.append);
} else {
console.debug("Hitting password size limit for calculating entropy")
value = 1000;
}
}

core.update(value);
Expand Down

0 comments on commit 2410ab3

Please sign in to comment.