Opened 8 years ago

Closed 8 years ago

#7507 closed (duplicate)

contrib.auth login form shouldn't limit username to 30 chars

Reported by: SmileyChris Owned by:
Component: contrib.auth Version: newforms-admin
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


That's only relevant if you're using the User model, and the form shouldn't be so tightly coupled with that since alternate auth backends can be used. (I for one am encountering this as a problem).

Attachments (1)

7507.diff (5.9 KB) - added by SmileyChris 8 years ago.
Patch for r8061 (post NFA merge)

Download all attachments as: .zip

Change History (7)

comment:1 Changed 8 years ago by SmileyChris

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Oops, that's a whole lot of whitespace my editor removed too.

Note that my patch also throws in a very minor fix to use return rather than .id in get_user_id()

The only problem this could cause is if db backends fail if you try to compare a long string against a short char db field. I don't think this is the case, just noting a potential caveat. If this is the case, then the default backend could be fixed to skip any auth attempts with more than 30 char usernames.

comment:2 Changed 8 years ago by serialx

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 8 years ago by SmileyChris

This probably should be fixed against newforms admin, right?

comment:4 Changed 8 years ago by Alex

I would think so, since NFA switched auth to use newforms.

Changed 8 years ago by SmileyChris

Patch for r8061 (post NFA merge)

comment:5 Changed 8 years ago by SmileyChris

Closed in favour of #9168

comment:6 Changed 8 years ago by gwilson

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

and #9168 closed in favor of #8274.

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