summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/config/emailconfig.py9
-rw-r--r--synapse/rest/client/v2_alpha/account.py4
2 files changed, 10 insertions, 3 deletions
diff --git a/synapse/config/emailconfig.py b/synapse/config/emailconfig.py
index 43ff2b263f..a8eccee257 100644
--- a/synapse/config/emailconfig.py
+++ b/synapse/config/emailconfig.py
@@ -153,8 +153,13 @@ class EmailConfig(Config):
                     raise ConfigError("Unable to find template file %s" % (p, ))
 
             # Retrieve content of web templates
-            self.email_password_reset_success_html_content = self._get_template_content(
-                self.email_template_dir, email_password_reset_success_template
+            filepath = os.path.join(
+                self.email_template_dir,
+                email_password_reset_success_template,
+            )
+            self.email_password_reset_success_html_content = self.read_file(
+                filepath, 
+                "email.password_reset_template_success_html",
             )
 
             if config.get("public_baseurl") is None:
diff --git a/synapse/rest/client/v2_alpha/account.py b/synapse/rest/client/v2_alpha/account.py
index 9cb18c5b94..3e33b5b551 100644
--- a/synapse/rest/client/v2_alpha/account.py
+++ b/synapse/rest/client/v2_alpha/account.py
@@ -229,7 +229,7 @@ class MsisdnPasswordRequestTokenRestServlet(RestServlet):
 class ThreepidSubmitTokenServlet(RestServlet):
     """Handles 3PID validation token submission"""
     PATTERNS = [
-        re.compile("/_synapse/password_reset/validate/(email|msisdn)/submitToken/*$"),
+        re.compile("^/_synapse/password_reset/(email|msisdn)/submit_token/*$"),
     ]
 
     def __init__(self, hs):
@@ -237,6 +237,7 @@ class ThreepidSubmitTokenServlet(RestServlet):
         Args:
             hs (synapse.server.HomeServer): server
         """
+        super(ThreepidSubmitTokenServlet, self).__init__()
         self.hs = hs
         self.auth = hs.get_auth()
         self.config = hs.config
@@ -640,6 +641,7 @@ class WhoamiRestServlet(RestServlet):
 def register_servlets(hs, http_server):
     EmailPasswordRequestTokenRestServlet(hs).register(http_server)
     MsisdnPasswordRequestTokenRestServlet(hs).register(http_server)
+    ThreepidSubmitTokenServlet(hs).register(http_server)
     PasswordRestServlet(hs).register(http_server)
     DeactivateAccountRestServlet(hs).register(http_server)
     EmailThreepidRequestTokenRestServlet(hs).register(http_server)