Code

Opened 6 years ago

Closed 6 years ago

#8042 closed (fixed)

PasswordResetForm's EmailField has maximum length of 40

Reported by: Bob Thomas <bthomas@…> Owned by: nobody
Component: contrib.auth Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

PasswordResetForm's EmailField has maximum length of 40, but the User model's email field has a maximum length of 75.

Trivial patch:

Index: django/contrib/auth/forms.py
===================================================================
--- django/contrib/auth/forms.py        (revision 8154)
+++ django/contrib/auth/forms.py        (working copy)
@@ -87,7 +87,7 @@
         return self.user_cache

 class PasswordResetForm(forms.Form):
-    email = forms.EmailField(label=_("E-mail"), max_length=40)
+    email = forms.EmailField(label=_("E-mail"), max_length=75)

     def clean_email(self):
         """

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by russellm

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

(In [8159]) Fixed #8042 -- Modified the password reset form so that the email field length matches the User model. Thanks to Bob Thomas <bthomas@…> for the report.

comment:2 Changed 6 years ago by andybak

  • Component changed from Uncategorized to Authentication
  • Has patch unset
  • milestone set to post-1.0
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution fixed deleted
  • Status changed from closed to reopened

Why 75 and why is it defined in two different places? Should this at least be made a constant for easy patching. Someone out there must have an email address longer than 75 characters. It would be RFC legal (AFAIK...)

comment:3 Changed 6 years ago by mtredinnick

  • milestone post-1.0 deleted
  • Resolution set to fixed
  • Status changed from reopened to closed

Please don't reopen tickets just because you don't agree with the commit. There isn't a bug here -- you're asking a support/dev question. Please take it to the appropriate mailing list.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.