Cracklib mangle remove trailing incorrect
Brought to you by:
orasis
The RULE_DLAST ']' is supposed to remove the last
character from the candidate string, but instead
removes the last two characters.
This causes some word rejections that should
considered ok. The truncation checks are intended to
test the word with the last 1, 2, and 3 characters
removed. Instead the last 2, 4, 6 characters are
removed.
A word like doctorXXXX should pass all tests, but since
the last 4 characters get truncated there is a dictionary
match.
Line 442 in Rules.java is the culprit.