summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-06-08 14:23:15 +0100
committerErik Johnston <erik@matrix.org>2016-06-08 14:23:15 +0100
commitefeabd31801224cbacd31b61ff0d869b70b1820d (patch)
treee4869b8386d2b9385589848f5badfa3b0bb5e156 /synapse
parentEnable auth on federation PublicRoomList (diff)
downloadsynapse-efeabd31801224cbacd31b61ff0d869b70b1820d.tar.xz
Log user that is making /publicRooms calls
Diffstat (limited to 'synapse')
-rw-r--r--synapse/rest/client/v1/room.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py
index db52a1fc39..604c2a565e 100644
--- a/synapse/rest/client/v1/room.py
+++ b/synapse/rest/client/v1/room.py
@@ -279,6 +279,13 @@ class PublicRoomListRestServlet(ClientV1RestServlet):
 
     @defer.inlineCallbacks
     def on_GET(self, request):
+        try:
+            yield self.auth.get_user_by_req(request)
+        except AuthError:
+            # This endpoint isn't authed, but its useful to know who's hitting
+            # it if they *do* supply an access token
+            pass
+
         handler = self.hs.get_room_list_handler()
         data = yield handler.get_aggregated_public_room_list()