summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorNegar Fazeli <negar.fazeli@ericsson.com>2016-07-08 16:53:18 +0200
committerNegar Fazeli <negar.fazeli@ericsson.com>2016-07-13 15:00:37 +0200
commit0136a522b18a734db69171d60566f501c0ced663 (patch)
tree0828758ba08b5eba36d0442a9785ebf9341b2033 /synapse/api/auth.py
parentMerge pull request #914 from matrix-org/markjh/upgrade (diff)
downloadsynapse-0136a522b18a734db69171d60566f501c0ced663.tar.xz
Bug fix: expire invalid access tokens
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r--synapse/api/auth.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index a4d658a9d0..521a52e001 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -629,7 +629,10 @@ class Auth(object):
         except AuthError:
             # TODO(daniel): Remove this fallback when all existing access tokens
             # have been re-issued as macaroons.
+            if self.hs.config.expire_access_token:
+                raise
             ret = yield self._look_up_user_by_access_token(token)
+
         defer.returnValue(ret)
 
     @defer.inlineCallbacks