Opened 16 years ago

Closed 16 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: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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):
         """

Change History (3)

comment:1 by Russell Keith-Magee, 16 years ago

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 by Andy Baker, 16 years ago

Component: UncategorizedAuthentication
Has patch: unset
milestone: post-1.0
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 by Malcolm Tredinnick, 16 years ago

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