You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey guys, I found in my tests using faker that, when required, Internet.password method does not include special_chars. I found that this is caused by rand method at line 64. You see rand(min_length) can return 0, in, in those cases, it simply does not add any special chars to passwords.
I'm creating a pull request, #926 where I changed the method to this rand(1..min_length) to have at least 1 non_word character.
To support this I created this little project that shows this problem. Also, if you run the tests against test_password_with_special_chars you can see that sometimes it passes, sometimes it doesn't. Since the addition of those chars are not deterministic, Ci and sporadic runs ay not detect this problems.
Thanks,
The text was updated successfully, but these errors were encountered:
Hey guys, I found in my tests using faker that, when required, Internet.password method does not include special_chars. I found that this is caused by
rand
method at line 64. You seerand(min_length)
can return 0, in, in those cases, it simply does not add any special chars to passwords.I'm creating a pull request, #926 where I changed the method to this
rand(1..min_length)
to have at least 1 non_word character.To support this I created this little project that shows this problem. Also, if you run the tests against
test_password_with_special_chars
you can see that sometimes it passes, sometimes it doesn't. Since the addition of those chars are not deterministic, Ci and sporadic runs ay not detect this problems.Thanks,
The text was updated successfully, but these errors were encountered: