[Django] #19130: Auth forms contain hard-coded assumptions about field length

3 views
Skip to first unread message

Django

unread,
Oct 16, 2012, 3:37:35 AM10/16/12
to django-...@googlegroups.com
#19130: Auth forms contain hard-coded assumptions about field length
------------------------------------------------+------------------------
Reporter: russellm | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
The auth forms contain some hardcoded assumptions about the length of the
username field.

In some cases, these are reasonable -- the user creation form should
reasonably check the expected length etc of the username field.

However, in other cases, it's just busy work:

* LoginForm sets max_length=30.

* PasswordResetFrom sets max_length=75 on the email field.

While it's possible for these forms to be customized by the end user, we
can avoid the need for 90% of users to need to do this customization by
making the defaults a little more accepting -- a length of 254 chars in
both cases would allow email addresses as login, without affecting the
data integrity of the actual user model.

--
Ticket URL: <https://code.djangoproject.com/ticket/19130>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 16, 2012, 4:03:59 AM10/16/12
to django-...@googlegroups.com
#19130: Auth forms contain hard-coded assumptions about field length
--------------------------------------+------------------------------------
Reporter: russellm | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: contrib.auth | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Russell Keith-Magee <russell@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"bfcda7781a886ab2b7b41937c0f49c088f58a3d7"]:
{{{
#!CommitTicketReference repository=""
revision="bfcda7781a886ab2b7b41937c0f49c088f58a3d7"
Fixed #19130 -- Made some of the auth forms more flexible for user models.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/19130#comment:1>

Django

unread,
Oct 20, 2017, 11:12:11 AM10/20/17
to django-...@googlegroups.com
#19130: Auth forms contain hard-coded assumptions about field length
--------------------------------------+------------------------------------
Reporter: Russell Keith-Magee | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: contrib.auth | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"d2333912085fc3bd827295f2bc8253d6723c242b" d2333912]:
{{{
#!CommitTicketReference repository=""
revision="d2333912085fc3bd827295f2bc8253d6723c242b"
Refs #19130 -- Added a test for AuthenticationForm.username max_length.

This will be a more useful regression test after refs #27515.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/19130#comment:2>

Reply all
Reply to author
Forward
0 new messages