Opened 6 years ago

Closed 6 years ago

Last modified 3 months ago

#12128 closed Uncategorized (fixed)

Remove restrictive 30 character limit from username of AuthenticationForm.

Reported by: SmileyChris Owned by: nobody
Component: contrib.auth Version: 1.1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: yes

Description

While #8274 at least makes it possible to override the form now, the current default doesn't make sense.

The AuthenticationForm is not directly tied to the User model - any backend could use it. Therefore, there should not be a default max_length for the username.

Change History (5)

comment:1 Changed 6 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

It may not be tied to the User model, but it is the natural authentication form *for* the User model.

comment:2 Changed 6 years ago by SmileyChris

It's the natural authentication form for *all* auth backends, the default of which uses the User model. Still think this is a rather silly constraint - if there was a max length check, it should happen in the backend.

comment:3 Changed 3 months ago by nehemiahjacob

  • Easy pickings unset
  • Severity set to Normal
  • Type set to Uncategorized
  • UI/UX unset

This 'wontfix' decision was taken nearly 6 years ago. Will there be a consideration to reopen this? Because I wish to use subclass AbstractUser model and impose email address as username. In this decade email addresses easily reach 30+ characters.

comment:4 Changed 3 months ago by nehemiahjacob

  • Easy pickings set
  • UI/UX set

comment:5 Changed 3 months ago by timgraham

  • Resolution changed from wontfix to fixed

The AuthenticationForm max_length was increased to 254 characters in bfcda7781a886ab2b7b41937c0f49c088f58a3d7 (Django 1.5) (#19130).

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