Ticket #3062: password-maxlength-removal.patch

File password-maxlength-removal.patch, 1.7 KB (added by Collin Grady <cgrady@…>, 18 years ago)
  • django/contrib/auth/forms.py

     
    1111        self.fields = (
    1212            forms.TextField(field_name='username', length=30, maxlength=30, is_required=True,
    1313                validator_list=[validators.isAlphaNumeric, self.isValidUsername]),
    14             forms.PasswordField(field_name='password1', length=30, maxlength=60, is_required=True),
    15             forms.PasswordField(field_name='password2', length=30, maxlength=60, is_required=True,
     14            forms.PasswordField(field_name='password1', length=30, is_required=True),
     15            forms.PasswordField(field_name='password2', length=30, is_required=True,
    1616                validator_list=[validators.AlwaysMatchesOtherField('password1', _("The two password fields didn't match."))]),
    1717        )
    1818
     
    110110    def __init__(self, user):
    111111        self.user = user
    112112        self.fields = (
    113             forms.PasswordField(field_name="old_password", length=30, maxlength=30, is_required=True,
     113            forms.PasswordField(field_name="old_password", length=30, is_required=True,
    114114                validator_list=[self.isValidOldPassword]),
    115             forms.PasswordField(field_name="new_password1", length=30, maxlength=30, is_required=True,
     115            forms.PasswordField(field_name="new_password1", length=30, is_required=True,
    116116                validator_list=[validators.AlwaysMatchesOtherField('new_password2', _("The two 'new password' fields didn't match."))]),
    117117            forms.PasswordField(field_name="new_password2", length=30, maxlength=30, is_required=True),
    118118        )
Back to Top