summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2016-07-14 15:51:52 +0100
committerGitHub <noreply@github.com>2016-07-14 15:51:52 +0100
commit209e04fa1192c3134f35f034d1ce02c6ad2fe658 (patch)
treed25564446dd0027da91269a427bab598ccf56024 /synapse/api
parentMerge pull request #915 from matrix-org/dbkr/more_requesttokens (diff)
parentBug fix: expire invalid access tokens (diff)
downloadsynapse-209e04fa1192c3134f35f034d1ce02c6ad2fe658.tar.xz
Merge pull request #918 from negzi/bugfix_for_token_expiry
Bug fix: expire invalid access tokens
Diffstat (limited to 'synapse/api')
-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