mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-09-28 02:10:53 -04:00
Add domain validation when creating room with list of invitees (#6121)
This commit is contained in:
parent
9a84d74417
commit
b5b03b7079
3 changed files with 13 additions and 1 deletions
|
@ -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. """
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue