Skip to content

Commit

Permalink
[3.0.x] Fixed #31505 -- Doc'd possible email addresses enumeration in…
Browse files Browse the repository at this point in the history
… PasswordResetView.

Backport of ca769c8 from master
  • Loading branch information
felixxm committed Apr 27, 2020
1 parent 657992c commit 04bc357
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/topics/auth/default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,16 @@ implementation details see :ref:`using-the-views`.
:class:`~django.contrib.auth.forms.PasswordResetForm` and use the
``form_class`` attribute.

.. note::

Be aware that sending an email costs extra time, hence you may be
vulnerable to an email address enumeration timing attack due to a
difference between the duration of a reset request for an existing
email address and the duration of a reset request for a nonexistent
email address. To reduce the overhead, you can use a 3rd party package
that allows to send emails asynchronously, e.g. `django-mailer
<https://pypi.org/project/django-mailer/>`_.

Users flagged with an unusable password (see
:meth:`~django.contrib.auth.models.User.set_unusable_password()` aren't
allowed to request a password reset to prevent misuse when using an
Expand Down

0 comments on commit 04bc357

Please sign in to comment.