summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-05-18 10:23:37 +0100
committerErik Johnston <erik@matrix.org>2015-05-18 10:23:37 +0100
commit131bdf9bb177a337a57f0a3f746ec019dbc5ace6 (patch)
tree8c26a82d488990d55c2ab51ded91fd7219ccbb8c /synapse/handlers/room.py
parentRemove pointless newline (diff)
parentMove get_events functions to storage.events (diff)
downloadsynapse-131bdf9bb177a337a57f0a3f746ec019dbc5ace6.tar.xz
Merge branch 'erikj/events_move' of github.com:matrix-org/synapse into erikj/perf
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,