summary refs log tree commit diff
path: root/tests/rest/client/v1/test_rooms.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-02-26 12:33:59 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-02-26 12:33:59 +0000
commit846f1c0593e08ce2d880e9314a69aeb86b8b2eb5 (patch)
tree6e40f8cd3fcfabd9050dae424ea46f574936e26d /tests/rest/client/v1/test_rooms.py
parentbefore fulfilling a group invite,check if user is already joined/invited (#3436) (diff)
parentAdd domain validation when creating room with list of invitees (#6121) (diff)
downloadsynapse-846f1c0593e08ce2d880e9314a69aeb86b8b2eb5.tar.xz
Add domain validation when creating room with list of invitees (#6121)
Diffstat (limited to 'tests/rest/client/v1/test_rooms.py')
-rw-r--r--tests/rest/client/v1/test_rooms.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/rest/client/v1/test_rooms.py b/tests/rest/client/v1/test_rooms.py

index fe741637f5..2f2ca74611 100644 --- a/tests/rest/client/v1/test_rooms.py +++ b/tests/rest/client/v1/test_rooms.py
@@ -484,6 +484,15 @@ class RoomsCreateTestCase(RoomBase): self.render(request) self.assertEquals(400, channel.code) + def test_post_room_invitees_invalid_mxid(self): + # POST with invalid invitee, see https://github.com/matrix-org/synapse/issues/4088 + # Note the trailing space in the MXID here! + request, channel = self.make_request( + "POST", "/createRoom", b'{"invite":["@alice:example.com "]}' + ) + self.render(request) + self.assertEquals(400, channel.code) + class RoomTopicTestCase(RoomBase): """ Tests /rooms/$room_id/topic REST events. """