Opened 15 years ago

Closed 13 years ago

Last modified 12 years ago

#9213 closed (fixed)

PasswordResetForm should not reset passwords for inactive users

Reported by: John-Scott Atlakson Owned by: anonymous
Component: contrib.auth Version: 1.3-alpha
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

django.contrib.auth.forms.PasswordResetForm currently just validates that there is at least one User object with the form submitted email address. However, users that have been set is_active = False can still send out password reset emails to themselves, which in my email template, displays their first name. I'd rather not give the impression that I'm hanging onto their personal data, just following the Django pattern of setting the is_active flag so banned users can't sign up with the same email again. I've attached a trivial patch. Although I've stated the short summary in the affirmative, if there are good reasons not to do this check, I'm all ears.

Attachments (2)

auth_forms.diff (683 bytes ) - added by John-Scott Atlakson 15 years ago.
9213.patch2 (2.8 KB ) - added by fadeev 13 years ago.
added test case, refactored other tests in the same suite a bit.

Download all attachments as: .zip

Change History (11)

by John-Scott Atlakson, 15 years ago

Attachment: auth_forms.diff added

comment:1 by Eric Holscher, 15 years ago

Triage Stage: UnreviewedAccepted

comment:2 by anonymous, 13 years ago

Owner: changed from nobody to anonymous
Status: newassigned
Version: 1.01.3-alpha

comment:3 by anonymous, 13 years ago

milestone: 1.3

comment:4 by Łukasz Rekucki, 13 years ago

Needs documentation: set
Needs tests: set

comment:5 by Jannis Leidel, 13 years ago

Component: Contrib appsAuthentication

by fadeev, 13 years ago

Attachment: 9213.patch2 added

added test case, refactored other tests in the same suite a bit.

comment:6 by fadeev, 13 years ago

in 9213.patch2 there is a one liner change in ResetPasswordForm.clean_email()

a new test fails before and works after.

comment:7 by Carl Meyer, 13 years ago

Resolution: fixed
Status: assignedclosed

In [15805]:

Fixed #9213 - Added check to prevent inactive users from resetting their password. Thanks to John Scott for report and draft patch, and Evgeny Fadeev for final patch with test.

comment:8 by Carl Meyer, 13 years ago

In [15808]:

[1.2.X] Fixed #9213 - Added check to prevent inactive users from resetting their password. Thanks to John Scott for report and draft patch, and Evgeny Fadeev for final patch with test.

Backport of r15805 from trunk.

comment:9 by Jacob, 12 years ago

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top