summary refs log tree commit diff
path: root/synapse/rest/consent
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-09-23 12:03:01 -0400
committerGitHub <noreply@github.com>2021-09-23 12:03:01 -0400
commit47854c71e9bded2c446a251f3ef16f4d5da96ebe (patch)
tree9d5c974bbb190a1c5ccbb06fda3db5cb8400a219 /synapse/rest/consent
parentBreak down cache expiry reasons in grafana (#10880) (diff)
downloadsynapse-47854c71e9bded2c446a251f3ef16f4d5da96ebe.tar.xz
Use direct references for configuration variables (part 4). (#10893)
Diffstat (limited to 'synapse/rest/consent')
-rw-r--r--synapse/rest/consent/consent_resource.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/consent/consent_resource.py b/synapse/rest/consent/consent_resource.py
index fc634a492d..3d2afacc50 100644
--- a/synapse/rest/consent/consent_resource.py
+++ b/synapse/rest/consent/consent_resource.py
@@ -100,13 +100,13 @@ class ConsentResource(DirectServeHtmlResource):
             loader=loader, autoescape=jinja2.select_autoescape(["html", "htm", "xml"])
         )
 
-        if hs.config.form_secret is None:
+        if hs.config.key.form_secret is None:
             raise ConfigError(
                 "Consent resource is enabled but form_secret is not set in "
                 "config file. It should be set to an arbitrary secret string."
             )
 
-        self._hmac_secret = hs.config.form_secret.encode("utf-8")
+        self._hmac_secret = hs.config.key.form_secret.encode("utf-8")
 
     async def _async_render_GET(self, request: Request) -> None:
         version = parse_string(request, "v", default=self._default_consent_version)