Opened 10 months ago
Last modified 10 months ago
#36140 closed Bug
UserCreationForm doesn't allow empty password even if password fields are specified as "not required" — at Initial Version
| Reported by: | buffgecko12 | Owned by: | |
|---|---|---|---|
| Component: | contrib.auth | Version: | 5.1 |
| Severity: | Release blocker | Keywords: | form usercreationform validation |
| Cc: | buffgecko12, Fabian Braun, Antoliny | Triage Stage: | Ready for checkin |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
There was a change made to UserCreationForm (django.contrib.auth.forms) in Django 5.1 which seems to require a password to be provided even if the password1 / password2 fields are explicitly marked as required = False. It looks like the validate_passwords() method is still being called even if the fields are marked as required = False.
Please see this issue for the details:
https://stackoverflow.com/questions/79387857/django-5-1-usercreationform-wont-allow-empty-passwords