Opened 7 years ago

Closed 6 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@…> 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@…>

Use regex in AuthenticationForm too

comment:1 Changed 6 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 6 years ago by SmileyChris

  • Resolution set to wontfix
  • Status changed from new to closed

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