Opened 7 years ago

Closed 7 years ago

#11127 closed (wontfix)

Consistent regex for django.contrib.auth.forms.AuthenticationForm

Reported by: Richard Davies <richard.davies@…> Owned by: nobody
Component: contrib.auth Version:
Severity: Keywords:
Cc: richard.davies@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In django/contrib/auth/forms.py, two out of three forms validate the username with a regex (UserCreationForm, UserChangeForm), but the third (AuthenticationForm) does not.

This patch copies the same regex to apply in that form too.

Attachments (1)

regex.diff (852 bytes) - added by Richard Davies <richard.davies@…> 7 years ago.
Use regex in AuthenticationForm too

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by Richard Davies <richard.davies@…>

Attachment: regex.diff added

Use regex in AuthenticationForm too

comment:1 Changed 7 years ago by Alex Gaynor

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 7 years ago by Chris Beaven

Resolution: wontfix
Status: newclosed

The UserCreationForm and UserChangeForm are directly tied to the User model. The AuthenticationForm is not - any backend could use it (which also makes the 30 character limit for username in there stupid, but at least #8274 will provide a workaround for that)

Note: See TracTickets for help on using tickets.
Back to Top