Opened 16 years ago
Closed 16 years ago
#11127 closed (wontfix)
Consistent regex for django.contrib.auth.forms.AuthenticationForm
| Reported by: | 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)
Change History (3)
by , 16 years ago
| Attachment: | regex.diff added |
|---|
comment:1 by , 16 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 16 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → 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)
Use regex in AuthenticationForm too