Opened 11 years ago

Closed 10 years ago

#7507 closed (duplicate)

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

Reported by: Chris Beaven 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: no UI/UX: no


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 Chris Beaven 11 years ago.
Patch for r8061 (post NFA merge)

Download all attachments as: .zip

Change History (7)

comment:1 Changed 11 years ago by Chris Beaven

Has patch: set

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 11 years ago by Sung-jin Hong

Triage Stage: UnreviewedAccepted

comment:3 Changed 11 years ago by Chris Beaven

This probably should be fixed against newforms admin, right?

comment:4 Changed 11 years ago by Alex Gaynor

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

Changed 11 years ago by Chris Beaven

Attachment: 7507.diff added

Patch for r8061 (post NFA merge)

comment:5 Changed 10 years ago by Chris Beaven

Closed in favour of #9168

comment:6 Changed 10 years ago by Gary Wilson

Resolution: duplicate
Status: newclosed

and #9168 closed in favor of #8274.

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