Open davidjwilkins opened 1 year ago
Describe the bug The getLength function is supposed to strip sequential characters after a run length of 2. e.g. fghijkl should become fg.
fghijkl
fg
However, because it first replaces the sequence asdfghjkl, it changes fghijkl to fgijk, which then becomes 'fgij, a length of 4.
asdfghjkl
fgijk
'fgij
To Reproduce
https://github.com/wagslane/go-password-validator/pull/14
Expected behavior It should change fghijkl to fg
Screenshots If applicable, add screenshots or console output that helps explain the situation
Environment (please complete the following information):
Additional context Add any other context about the problem here.
Describe the bug The getLength function is supposed to strip sequential characters after a run length of 2. e.g.
fghijkl
should becomefg
.However, because it first replaces the sequence
asdfghjkl
, it changesfghijkl
tofgijk
, which then becomes'fgij
, a length of 4.To Reproduce
https://github.com/wagslane/go-password-validator/pull/14
Expected behavior It should change
fghijkl
tofg
Screenshots If applicable, add screenshots or console output that helps explain the situation
Environment (please complete the following information):
Additional context Add any other context about the problem here.