From 8dff194e9b22e05c4146798c7b00bbf48af80213 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Fri, 1 Aug 2008 21:18:17 +0000 Subject: [PATCH] Fixed #3062 - removed arbitrary and unneeded max_length on password fields in auth forms. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8180 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/auth/forms.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/django/contrib/auth/forms.py b/django/contrib/auth/forms.py index 730744567c..2b30e483c6 100644 --- a/django/contrib/auth/forms.py +++ b/django/contrib/auth/forms.py @@ -14,8 +14,8 @@ class UserCreationForm(forms.ModelForm): username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^\w+$', help_text = _("Required. 30 characters or fewer. Alphanumeric characters only (letters, digits and underscores)."), error_message = _("This value must contain only letters, numbers and underscores.")) - password1 = forms.CharField(label=_("Password"), max_length=60, widget=forms.PasswordInput) - password2 = forms.CharField(label=_("Password confirmation"), max_length=60, widget=forms.PasswordInput) + password1 = forms.CharField(label=_("Password"), widget=forms.PasswordInput) + password2 = forms.CharField(label=_("Password confirmation"), widget=forms.PasswordInput) class Meta: model = User @@ -49,7 +49,7 @@ class AuthenticationForm(forms.Form): username/password logins. """ username = forms.CharField(label=_("Username"), max_length=30) - password = forms.CharField(label=_("Password"), max_length=30, widget=forms.PasswordInput) + password = forms.CharField(label=_("Password"), widget=forms.PasswordInput) def __init__(self, request=None, *args, **kwargs): """ @@ -131,8 +131,8 @@ class SetPasswordForm(forms.Form): A form that lets a user change set his/her password without entering the old password """ - new_password1 = forms.CharField(label=_("New password"), max_length=60, widget=forms.PasswordInput) - new_password2 = forms.CharField(label=_("New password confirmation"), max_length=60, widget=forms.PasswordInput) + new_password1 = forms.CharField(label=_("New password"), widget=forms.PasswordInput) + new_password2 = forms.CharField(label=_("New password confirmation"), widget=forms.PasswordInput) def __init__(self, user, *args, **kwargs): self.user = user @@ -157,7 +157,7 @@ class PasswordChangeForm(SetPasswordForm): A form that lets a user change his/her password by entering their old password. """ - old_password = forms.CharField(label=_("Old password"), max_length=60, widget=forms.PasswordInput) + old_password = forms.CharField(label=_("Old password"), widget=forms.PasswordInput) def clean_old_password(self): """ @@ -173,8 +173,8 @@ class AdminPasswordChangeForm(forms.Form): """ A form used to change the password of a user in the admin interface. """ - password1 = forms.CharField(label=_("Password"), max_length=60, widget=forms.PasswordInput) - password2 = forms.CharField(label=_("Password (again)"), max_length=60, widget=forms.PasswordInput) + password1 = forms.CharField(label=_("Password"), widget=forms.PasswordInput) + password2 = forms.CharField(label=_("Password (again)"), widget=forms.PasswordInput) def __init__(self, user, *args, **kwargs): self.user = user