Ticket #3062: password-maxlength-removal.2.patch
File password-maxlength-removal.2.patch, 2.3 KB (added by , 18 years ago) |
---|
-
django/contrib/auth/forms.py
11 11 self.fields = ( 12 12 forms.TextField(field_name='username', length=30, maxlength=30, is_required=True, 13 13 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, 16 16 validator_list=[validators.AlwaysMatchesOtherField('password1', _("The two password fields didn't match."))]), 17 17 ) 18 18 … … 43 43 self.fields = [ 44 44 forms.TextField(field_name="username", length=15, maxlength=30, is_required=True, 45 45 validator_list=[self.isValidUser, self.hasCookiesEnabled]), 46 forms.PasswordField(field_name="password", length=15, maxlength=30,is_required=True),46 forms.PasswordField(field_name="password", length=15, is_required=True), 47 47 ] 48 48 self.user_cache = None 49 49 … … 110 110 def __init__(self, user): 111 111 self.user = user 112 112 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, 114 114 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, 116 116 validator_list=[validators.AlwaysMatchesOtherField('new_password2', _("The two 'new password' fields didn't match."))]), 117 forms.PasswordField(field_name="new_password2", length=30, maxlength=30,is_required=True),117 forms.PasswordField(field_name="new_password2", length=30, is_required=True), 118 118 ) 119 119 120 120 def isValidOldPassword(self, new_data, all_data):