Opened 24 hours ago
#36140 new Bug
UserCreationForm doesn't allow empty password even if password fields are specified as "not required"
Reported by: | buffgecko12 | Owned by: | |
---|---|---|---|
Component: | Forms | Version: | 5.1 |
Severity: | Normal | Keywords: | form usercreationform validation |
Cc: | buffgecko12 | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | 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
Note:
See TracTickets
for help on using tickets.