summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--changelog.d/28.bugfix1
-rw-r--r--synapse/handlers/account_validity.py6
-rw-r--r--synapse/python_dependencies.py4
3 files changed, 9 insertions, 2 deletions
diff --git a/changelog.d/28.bugfix b/changelog.d/28.bugfix
new file mode 100644

index 0000000000..38d7455971 --- /dev/null +++ b/changelog.d/28.bugfix
@@ -0,0 +1 @@ +Fix a bug causing account validity renewal emails to be sent even if the feature is turned off in some cases. diff --git a/synapse/handlers/account_validity.py b/synapse/handlers/account_validity.py
index 947237d7da..51507bde61 100644 --- a/synapse/handlers/account_validity.py +++ b/synapse/handlers/account_validity.py
@@ -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 diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py
index 7dfa78dadb..437e79f27c 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py
@@ -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",