summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-01-28 17:46:34 +0000
committerRichard van der Hoff <richard@matrix.org>2020-01-29 11:52:52 +0000
commitdcd85b976dc93851d7f5246fc0684d5c5f7d7b5b (patch)
tree35605d9b516a72ba17f68cea93a1cf373252df8d /synapse/handlers
parentSet the PL for aliases events to 0. (diff)
downloadsynapse-dcd85b976dc93851d7f5246fc0684d5c5f7d7b5b.tar.xz
Make /directory/room/<alias> handle restrictive power levels
Fixes a bug where the alias would be added, but `PUT /directory/room/<alias>`
would return a 403.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/directory.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/handlers/directory.py b/synapse/handlers/directory.py
index a07d2f1a17..8c5980cb0c 100644
--- a/synapse/handlers/directory.py
+++ b/synapse/handlers/directory.py
@@ -151,7 +151,12 @@ class DirectoryHandler(BaseHandler):
 
         yield self._create_association(room_alias, room_id, servers, creator=user_id)
         if send_event:
-            yield self.send_room_alias_update_event(requester, room_id)
+            try:
+                yield self.send_room_alias_update_event(requester, room_id)
+            except AuthError as e:
+                # sending the aliases event may fail due to the user not having
+                # permission in the room; this is permitted.
+                logger.info("Skipping updating aliases event due to auth error %s", e)
 
     @defer.inlineCallbacks
     def delete_association(self, requester, room_alias, send_event=True):