1
0

Fix buggy condition in account validity handler (#28)

This commit is contained in:
Brendan Abolivier
2020-03-16 11:32:23 +00:00
committed by GitHub
parent cafeb5e0e7
commit 21c9e4d054
3 changed files with 9 additions and 2 deletions

1
changelog.d/28.bugfix Normal file
View File

@@ -0,0 +1 @@
Fix a bug causing account validity renewal emails to be sent even if the feature is turned off in some cases.

View File

@@ -45,7 +45,11 @@ class AccountValidityHandler(object):
self._show_users_in_user_directory = self.hs.config.show_users_in_user_directory
self.profile_handler = self.hs.get_profile_handler()
if self._account_validity.renew_by_email_enabled and load_jinja2_templates:
if (
self._account_validity.enabled
and self._account_validity.renew_by_email_enabled
and load_jinja2_templates
):
# Don't do email-specific configuration if renewal by email is disabled.
try:
app_name = self.hs.config.email_app_name

View File

@@ -42,7 +42,9 @@ REQUIREMENTS = [
"frozendict>=1",
"unpaddedbase64>=1.1.0",
"canonicaljson>=1.1.3",
"signedjson>=1.0.0",
# Pin signedjson to 1.0.0 because this version of Synapse relies on a function that's
# been removed in 1.1.0. Hopefully, this will be fixed by the upcoming mainline merge.
"signedjson==1.0.0",
"pynacl>=1.2.1",
"idna>=2",