Opened 8 years ago

Closed 8 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:


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/
--- django/contrib/auth/        (revision 8154)
+++ django/contrib/auth/        (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):

Change History (3)

comment:1 Changed 8 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(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 8 years ago by Andy Baker

Component: UncategorizedAuthentication
Has patch: unset
milestone: post-1.0
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: fixed
Status: closedreopened

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 8 years ago by Malcolm Tredinnick

milestone: post-1.0
Resolution: fixed
Status: reopenedclosed

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.

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