Opened 16 years ago

Closed 15 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

Description

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

Download all attachments as: .zip

Change History (7)

comment:1 by Chris Beaven, 16 years ago

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 self.user_cache.pk 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 by Sung-jin Hong, 16 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Chris Beaven, 16 years ago

This probably should be fixed against newforms admin, right?

comment:4 by Alex Gaynor, 16 years ago

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

by Chris Beaven, 16 years ago

Attachment: 7507.diff added

Patch for r8061 (post NFA merge)

comment:5 by Chris Beaven, 16 years ago

Closed in favour of #9168

comment:6 by Gary Wilson, 15 years ago

Resolution: duplicate
Status: newclosed

and #9168 closed in favor of #8274.

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