summary refs log tree commit diff
path: root/synapse/rest/client/v1/room.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2019-05-08 16:29:45 -0500
committerAmber Brown <hawkowl@atleastfornow.net>2019-05-08 16:29:45 -0500
commitfaee1e9baba74b08fb991d57effd06f87147fc76 (patch)
treeb15c6241318be63f4043c018964b2f7382b65738 /synapse/rest/client/v1/room.py
parentMerge remote-tracking branch 'origin/develop' into shhs (diff)
parentFix bogus imports in tests (#5154) (diff)
downloadsynapse-faee1e9baba74b08fb991d57effd06f87147fc76.tar.xz
Merge remote-tracking branch 'origin/develop' into shhs
Diffstat (limited to 'synapse/rest/client/v1/room.py')
-rw-r--r--synapse/rest/client/v1/room.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py

index 48da4d557f..fab04965cb 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py
@@ -301,6 +301,12 @@ class PublicRoomListRestServlet(ClientV1RestServlet): try: yield self.auth.get_user_by_req(request, allow_guest=True) except AuthError as e: + # Option to allow servers to require auth when accessing + # /publicRooms via CS API. This is especially helpful in private + # federations. + if self.hs.config.restrict_public_rooms_to_local_users: + raise + # We allow people to not be authed if they're just looking at our # room list, but require auth when we proxy the request. # In both cases we call the auth function, as that has the side