From 21c9e4d054b57cbff6dcffe4ef0796a38a6084cb Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Mon, 16 Mar 2020 11:32:23 +0000 Subject: Fix buggy condition in account validity handler (#28) --- synapse/handlers/account_validity.py | 6 +++++- synapse/python_dependencies.py | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'synapse') 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", -- cgit 1.5.1