Opened 9 years ago

Closed 9 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:


In django/contrib/auth/, 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@…> 9 years ago.
Use regex in AuthenticationForm too

Download all attachments as: .zip

Change History (3)

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

Attachment: regex.diff added

Use regex in AuthenticationForm too

comment:1 Changed 9 years ago by Alex Gaynor

Triage Stage: UnreviewedAccepted

comment:2 Changed 9 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