Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Internet password method sometimes doesn't include special chars #927

Closed
allam-matsubara opened this issue May 26, 2017 · 1 comment
Closed

Comments

@allam-matsubara
Copy link
Contributor

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,

@allam-matsubara
Copy link
Contributor Author

Any news about this or the PR #926 ?

@stympy stympy closed this as completed in 76dc390 Jul 10, 2017
landongrindheim pushed a commit to landongrindheim/faker that referenced this issue Oct 7, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant