Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
confirmation: Use expiry_date to verify validity.
Mateusz Manderade5fc7826b61
diff --git a/confirmation/models.py b/confirmation/models.pyindex 276eab32f44..c9f774bf81c 100644--- a/confirmation/models.py+++ b/confirmation/models.py@@ -70,8 +70,7 @@ def get_object_from_key(except Confirmation.DoesNotExist:raise ConfirmationKeyException(ConfirmationKeyException.DOES_NOT_EXIST)- time_elapsed = timezone_now() - confirmation.date_sent- if time_elapsed.total_seconds() > _properties[confirmation.type].validity_in_days * 24 * 3600:+ if timezone_now() > confirmation.expiry_date:raise ConfirmationKeyException(ConfirmationKeyException.EXPIRED)obj = confirmation.content_object