diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2021-06-24 15:30:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-24 15:30:49 +0100 |
commit | 6e8fb42be7657f9d4958c02d87cff865225714d2 (patch) | |
tree | 6f287326b09faae0ec5ced43d4718b92d4b20cf3 /tests | |
parent | MSC2918 Refresh tokens implementation (#9450) (diff) | |
download | synapse-6e8fb42be7657f9d4958c02d87cff865225714d2.tar.xz |
Improve validation for `send_{join,leave,knock}` (#10225)
The idea here is to stop people sending things that aren't joins/leaves/knocks through these endpoints: previously you could send anything you liked through them. I wasn't able to find any security holes from doing so, but it doesn't sound like a good thing.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/handlers/test_federation.py | 2 | ||||
-rw-r--r-- | tests/replication/test_federation_sender_shard.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/handlers/test_federation.py b/tests/handlers/test_federation.py index 8796af45ed..ba8cf44f46 100644 --- a/tests/handlers/test_federation.py +++ b/tests/handlers/test_federation.py @@ -251,7 +251,7 @@ class FederationTestCase(unittest.HomeserverTestCase): join_event.signatures[other_server] = {"x": "y"} with LoggingContext("send_join"): d = run_in_background( - self.handler.on_send_join_request, other_server, join_event + self.handler.on_send_membership_event, other_server, join_event ) self.get_success(d) diff --git a/tests/replication/test_federation_sender_shard.py b/tests/replication/test_federation_sender_shard.py index 584da58371..a0c710f855 100644 --- a/tests/replication/test_federation_sender_shard.py +++ b/tests/replication/test_federation_sender_shard.py @@ -228,7 +228,7 @@ class FederationSenderTestCase(BaseMultiWorkerStreamTestCase): builder.build(prev_event_ids=prev_event_ids, auth_event_ids=None) ) - self.get_success(federation.on_send_join_request(remote_server, join_event)) + self.get_success(federation.on_send_membership_event(remote_server, join_event)) self.replicate() return room |