Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

password validation support #45

Open
g-k opened this issue Apr 1, 2016 · 1 comment
Open

password validation support #45

g-k opened this issue Apr 1, 2016 · 1 comment

Comments

@g-k
Copy link

g-k commented Apr 1, 2016

It'd be good to support password-validation added in Django 1.9.

It's currently possible to reset passwords to one char (e.g. a), common passwords (e.g. abc123), and the username (e.g. username admin and password admin). Password validators could prevent this.

This is a difference with the builtin django.contrib.auth password reset on 1.9 (refs: #26).

@tedgruenloh
Copy link

I encountered this, and fixed it with a one liner (if you don't count the corresponding import) in the clean_password2() function of PasswordResetForm. Hope this helps, and thanks for your work on this.

from django.contrib.auth.password_validation import validate_password
validate_password(self.cleaned_data.get('password1'))

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

No branches or pull requests

2 participants