summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-05-18 13:50:01 +0100
committerMark Haines <mark.haines@matrix.org>2015-05-18 13:50:01 +0100
commit0b0033c40b29fd78384863bce932b31ebe281d95 (patch)
tree1e56a17d193b01f12c3bb5b897274f8753ed3531 /synapse/handlers/room.py
parentMake sure the notifier stream token goes forward when it is updated. Sort the... (diff)
parentMerge pull request #153 from matrix-org/markjh/presence_docstring (diff)
downloadsynapse-0b0033c40b29fd78384863bce932b31ebe281d95.tar.xz
Merge branch 'develop' into notifier_performance
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index dac683616a..401cc677d1 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -26,6 +26,7 @@ from synapse.util.async import run_on_reactor
 from synapse.events.utils import serialize_event
 
 import logging
+import string
 
 logger = logging.getLogger(__name__)
 
@@ -50,6 +51,10 @@ class RoomCreationHandler(BaseHandler):
         self.ratelimit(user_id)
 
         if "room_alias_name" in config:
+            for wchar in string.whitespace:
+                if wchar in config["room_alias_name"]:
+                    raise SynapseError(400, "Invalid characters in room alias")
+
             room_alias = RoomAlias.create(
                 config["room_alias_name"],
                 self.hs.hostname,