Django

Code

Ticket #8042 (closed: fixed)

Opened 4 months ago

Last modified 3 months ago

PasswordResetForm's EmailField has maximum length of 40

Reported by: Bob Thomas <bthomas@ncircle.com> Assigned to: nobody
Milestone: Component: Authentication
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

Change History

07/31/08 04:08:56 changed by russellm

  • status changed from new to closed.
  • resolution set to fixed.

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

08/24/08 19:13:53 changed by andybak

  • status changed from closed to reopened.
  • needs_better_patch changed.
  • component changed from Uncategorized to Authentication.
  • needs_tests changed.
  • milestone set to post-1.0.
  • needs_docs changed.
  • has_patch deleted.
  • resolution deleted.

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...)

08/24/08 19:34:13 changed by mtredinnick

  • status changed from reopened to closed.
  • resolution set to fixed.
  • milestone deleted.

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/Change #8042 (PasswordResetForm's EmailField has maximum length of 40)




Change Properties
Action