Closed fishilico closed 6 years ago
Just wondering, is it normal that in the happy path, PasswordResetFrom.clean()
returns nothing?
Good point. Returning None
works because if email
is not present, self._errors['email']
would be populated. Anyway the function should return the return value of the parent class here.
When the email address (or username) entered into the password reset form is empty, "cleaned_data = super(PasswordResetFrom, self).clean()" drop this field, but PasswordResetFrom.clean() expects cleaned_data['email'] to be present. Remove such an assumption.
It is currently easy to trigger an HTTP 500 error by entering a space in the recovery email form field.