summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-10-21 16:15:20 +0100
committerErik Johnston <erik@matrix.org>2020-10-21 16:53:40 +0100
commitd8902d4bd59bcecc46e595df5902385cf46c55d9 (patch)
treea152aa2fd9e6c672727df5f0fa28e33f0971b4df /synapse/handlers
parentPrivacy policy applies to authenticated entity (diff)
downloadsynapse-d8902d4bd59bcecc46e595df5902385cf46c55d9.tar.xz
MAU limits are based off of the *authenticated* user
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/message.py2
-rw-r--r--synapse/handlers/room.py2
-rw-r--r--synapse/handlers/sync.py4
3 files changed, 5 insertions, 3 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py

index 2137d2461e..af72c2b42a 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py
@@ -473,7 +473,7 @@ class EventCreationHandler: Returns: Tuple of created event, Context """ - await self.auth.check_auth_blocking(requester.user.to_string()) + await self.auth.check_auth_blocking(requester=requester) if event_dict["type"] == EventTypes.Create and event_dict["state_key"] == "": room_version = event_dict["content"]["room_version"] diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index ec300d8877..11c4355082 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py
@@ -587,7 +587,7 @@ class RoomCreationHandler(BaseHandler): """ user_id = requester.user.to_string() - await self.auth.check_auth_blocking(user_id) + await self.auth.check_auth_blocking(requester=requester) if ( self._server_notices_mxid is not None diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index b527724bc4..97387bc0b0 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py
@@ -31,6 +31,7 @@ from synapse.types import ( Collection, JsonDict, MutableStateMap, + Requester, RoomStreamToken, StateMap, StreamToken, @@ -260,6 +261,7 @@ class SyncHandler: async def wait_for_sync_for_user( self, + requester: Requester, sync_config: SyncConfig, since_token: Optional[StreamToken] = None, timeout: int = 0, @@ -273,7 +275,7 @@ class SyncHandler: # not been exceeded (if not part of the group by this point, almost certain # auth_blocking will occur) user_id = sync_config.user.to_string() - await self.auth.check_auth_blocking(user_id) + await self.auth.check_auth_blocking(requester=requester) res = await self.response_cache.wrap( sync_config.request_key,