summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2018-08-14 15:04:48 +0100
committerNeil Johnson <neil@matrix.org>2018-08-14 15:04:48 +0100
commited4bc3d2fc7242e27b3cdd36bc6c27c98fac09c8 (patch)
treeb3169a4297acbc2e437fa27d6f0ce2e0b05d30a8 /synapse/handlers
parentMerge branch 'neilj/admin_email' of github.com:matrix-org/synapse into neilj/... (diff)
downloadsynapse-ed4bc3d2fc7242e27b3cdd36bc6c27c98fac09c8.tar.xz
fix off by 1s on mau
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/auth.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index 7ea8ce9f94..7baaa39447 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -520,7 +520,7 @@ class AuthHandler(BaseHandler):
         """
         logger.info("Logging in user %s on device %s", user_id, device_id)
         access_token = yield self.issue_access_token(user_id, device_id)
-        yield self.auth.check_auth_blocking()
+        yield self.auth.check_auth_blocking(user_id)
 
         # the device *should* have been registered before we got here; however,
         # it's possible we raced against a DELETE operation. The thing we
@@ -734,7 +734,6 @@ class AuthHandler(BaseHandler):
 
     @defer.inlineCallbacks
     def validate_short_term_login_token_and_get_user_id(self, login_token):
-        yield self.auth.check_auth_blocking()
         auth_api = self.hs.get_auth()
         user_id = None
         try:
@@ -743,6 +742,7 @@ class AuthHandler(BaseHandler):
             auth_api.validate_macaroon(macaroon, "login", True, user_id)
         except Exception:
             raise AuthError(403, "Invalid token", errcode=Codes.FORBIDDEN)
+        yield self.auth.check_auth_blocking(user_id)
         defer.returnValue(user_id)
 
     @defer.inlineCallbacks