summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-03-24 15:33:48 +0000
committerDavid Baker <dave@matrix.org>2015-03-24 15:33:48 +0000
commitd19e79ecc956e5ba7ed6b6fd37e80ec6a737b048 (patch)
treed81b0d3dc96565254d523dbd96a235e8b0539f04 /synapse/rest
parentpep8 / pyflakes (diff)
downloadsynapse-d19e79ecc956e5ba7ed6b6fd37e80ec6a737b048.tar.xz
Make deleting other access tokens when you change your password actually work
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/v2_alpha/password.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/rest/client/v2_alpha/password.py b/synapse/rest/client/v2_alpha/password.py
index 1277532110..85954c71cd 100644
--- a/synapse/rest/client/v2_alpha/password.py
+++ b/synapse/rest/client/v2_alpha/password.py
@@ -65,12 +65,15 @@ class PasswordRestServlet(RestServlet):
             raise SynapseError(400, "", Codes.MISSING_PARAM)
         new_password = body['new_password']
 
-        self.login_handler.set_password(
+        yield self.login_handler.set_password(
             user_id, new_password, client.token_id
         )
 
         defer.returnValue((200, {}))
 
+    def on_OPTIONS(self, _):
+        return 200, {}
+
 
 def register_servlets(hs, http_server):
     PasswordRestServlet(hs).register(http_server)