summary refs log tree commit diff
path: root/synapse/rest/client
diff options
context:
space:
mode:
authorJacek KuĊ›nierz <kusnierz@protonmail.com>2022-07-12 20:48:29 +0200
committerGitHub <noreply@github.com>2022-07-12 18:48:29 +0000
commit7218a0ca1871c881070a25e33bb1198f51ba1e3a (patch)
tree469a60e913d33aa1758b4381484f2da4dc5a7c95 /synapse/rest/client
parentRename test case method to `add_hashes_and_signatures_from_other_server` (#13... (diff)
downloadsynapse-7218a0ca1871c881070a25e33bb1198f51ba1e3a.tar.xz
Drop support for calling `/_matrix/client/v3/account/3pid/bind` without an `id_access_token` (#13239)
Fixes #13201

Signed-off-by: Jacek Kusnierz jacek.kusnierz@tum.de
Diffstat (limited to 'synapse/rest/client')
-rw-r--r--synapse/rest/client/account.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/rest/client/account.py b/synapse/rest/client/account.py
index 19c2da4244..0cc87a4001 100644
--- a/synapse/rest/client/account.py
+++ b/synapse/rest/client/account.py
@@ -704,10 +704,12 @@ class ThreepidBindRestServlet(RestServlet):
     async def on_POST(self, request: SynapseRequest) -> Tuple[int, JsonDict]:
         body = parse_json_object_from_request(request)
 
-        assert_params_in_dict(body, ["id_server", "sid", "client_secret"])
+        assert_params_in_dict(
+            body, ["id_server", "sid", "id_access_token", "client_secret"]
+        )
         id_server = body["id_server"]
         sid = body["sid"]
-        id_access_token = body.get("id_access_token")  # optional
+        id_access_token = body["id_access_token"]
         client_secret = body["client_secret"]
         assert_valid_client_secret(client_secret)