zulip/confirmation
Mateusz Mandera 0e2691815e confirmation: Prevent re-use of email change links.
The .status value of EmailChangeStatus was not being looked
at anywhere to prevent re-use of email change confirmation links. This
is not a security issue, since the EmailChangeStatus object has a fixed
value for the new_email, while the confirmation link has expiry time of
1 day, which prevents any reasonable malicious scenarios.

We fix this by making get_object_from_key look at
confirmation.content_object.status - which applies
generally to all confirmations where the attached object has the .status
attribute. This is desired, because we never want to
successfully get_object_from_key an object that has already been used or
reused.
This makes the prereg_user.status check in check_prereg_key redundant so
it can be deleted.
2022-07-26 17:14:26 -07:00
..
management Django 1.10: Remove cleanupconfirmation management command. 2016-11-26 15:04:20 -08:00
migrations typing: Use BaseDatabaseSchemaEditor in place of DatabaseSchemaEditor. 2022-05-30 14:18:53 -07:00
CHANGELOG.txt
LICENSE.txt
README.txt
__init__.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
models.py confirmation: Prevent re-use of email change links. 2022-07-26 17:14:26 -07:00
settings.py confirmation: Rename STATUS_ACTIVE to STATUS_USED. 2022-07-21 15:17:37 -07:00

README.txt

===================
Django Confirmation
===================

This is a generic object confirmation system for Django applications.

For installation instructions, see the file "INSTALL.txt" in this
directory; for instructions on how to use this application, and on
what it provides, see the file "overview.txt" in the "docs/"
directory.