diff options
Diffstat (limited to 'js/score.js')
-rw-r--r-- | js/score.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/score.js b/js/score.js index ed08357..6520c72 100644 --- a/js/score.js +++ b/js/score.js @@ -373,16 +373,18 @@ Score.prototype = { var string = original.toLowerCase(); var reversed = this.getReversedString(string); + var originalPattern = this.password.substring(i, j + 1); + if (string in dictionary) { matches[matches.length] = { - pattern: original, + pattern: originalPattern, entropy: this.calculateLeetSpeakEntropy(this.password.substring(i, j + 1), string, dictionary[string]) }; } if (reversed in dictionary) { matches[matches.length] = { - pattern: original, + pattern: originalPattern, entropy: this.calculateReversedLeetSpeakEntropy(this.password.substring(i, j + 1), string, dictionary[string]) }; } |