summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authordklug <dklug@ucmerced.edu>2018-03-02 22:01:27 -0800
committerdklug <dklug@ucmerced.edu>2018-03-02 22:01:27 -0800
commitaf7ed8e1ef3c8f9f8c247aa77f193c63a4e286a5 (patch)
tree6fec8cd711a2789b6935fccf1607368608f73f0b /synapse
parentMerge pull request #2933 from matrix-org/erikj/3pid_yield (diff)
downloadsynapse-af7ed8e1ef3c8f9f8c247aa77f193c63a4e286a5.tar.xz
Return 401 for invalid access_token on logout
Signed-off-by: Duncan Klug <dklug@ucmerced.edu>
Diffstat (limited to '')
-rw-r--r--synapse/rest/client/v1/logout.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/rest/client/v1/logout.py b/synapse/rest/client/v1/logout.py
index ca49955935..e092158cb7 100644
--- a/synapse/rest/client/v1/logout.py
+++ b/synapse/rest/client/v1/logout.py
@@ -44,7 +44,10 @@ class LogoutRestServlet(ClientV1RestServlet):
             requester = yield self.auth.get_user_by_req(request)
         except AuthError:
             # this implies the access token has already been deleted.
-            pass
+            defer.returnValue((401, {
+                "errcode": "M_UNKNOWN_TOKEN",
+                "error": "Access Token unknown or expired"
+            }))
         else:
             if requester.device_id is None:
                 # the acccess token wasn't associated with a device.