From d4f2f5d3afd1b000bf9d7b12fb92ea6dfb783222 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Fri, 13 Mar 2020 10:00:22 +0000 Subject: [PATCH 1/3] Fix buggy condition in account validity handler --- synapse/handlers/account_validity.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 @@ def __init__(self, hs): 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 From e6da1cb9ec38b03e3dad72c9f89c49aa4e693711 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Fri, 13 Mar 2020 10:09:55 +0000 Subject: [PATCH 2/3] Changelog --- changelog.d/28.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/28.bugfix 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. From cf80c95c021f94b83a292f55d7e1811e945f4006 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Fri, 13 Mar 2020 10:22:46 +0000 Subject: [PATCH 3/3] Pin signedjson==1.0.0 --- synapse/python_dependencies.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 @@ "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",