gofakeit icon indicating copy to clipboard operation
gofakeit copied to clipboard

Generated password does not meet specified criteria

Open vivekweb2013 opened this issue 9 months ago • 1 comments

The gofakeit.Password function does not seem to produce the a password with specified criteria when the tests are executed in parallel.

For example I have

gofakeit.Password(true, true, true, true, false, 12)

in my parallel tests. The tests verify that provided password contains at-least one uppercase & one lowercase character. The tests are failing intermittently as the generated password sometimes does not include uppercase and lowercase character even if true is specified for the respective parameters.

I think the library only uses the specified sets(uppercase, lowercase, number etc) for generating random password but does not guarantee that chars from these will be included in generated password.

Can we modify the function to add at-least one char from the enabled sets? Or maybe provide another function that does this 🤔

vivekweb2013 avatar May 21 '24 04:05 vivekweb2013