Skip to content

Conversation

@laba-ehehe
Copy link

What does this change

This pull request adds a new feature to the Faker library: a strong password generator. It introduces a new provider, faker/providers/password, with a strong_password method. The new method allows users to generate passwords that meet specific security policies, which is useful for testing common real-world login and signup scenarios.

What was wrong

Nothing was wrong. The Faker library previously did not have a provider for generating passwords that meet customizable security policies.

How this fixes it

This PR resolves the issue by implementing a new strong_password method with flexible parameters. Users can now specify the total length of the password and a minimum number of min_upper, min_lower, min_digits, and min_symbols. The method also includes an allow_ambiguous flag to exclude commonly confused characters by default. Comprehensive unit tests have been included to ensure the functionality is correct and all specified constraints are met.

Fixes #2240

Checklist

  • I have read the documentation about CONTRIBUTING
  • I have read the documentation about Coding style
  • I have run make lint

@stefan6419846
Copy link
Contributor

There already is #2241 with a maintainer comment indicating that improving the existing method appears to be preferred: #2241 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Add strong password generator provider

2 participants