Opened 15 years ago

Closed 15 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: no UI/UX: no

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@…> 15 years ago.
Use regex in AuthenticationForm too

Download all attachments as: .zip

Change History (3)

by Richard Davies <richard.davies@…>, 15 years ago

Attachment: regex.diff added

Use regex in AuthenticationForm too

comment:1 by Alex Gaynor, 15 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Chris Beaven, 15 years ago

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