diff --git a/changelog.d/6056.bugfix b/changelog.d/6056.bugfix index ae31ff3fb4aa..8f4a12279433 100644 --- a/changelog.d/6056.bugfix +++ b/changelog.d/6056.bugfix @@ -1 +1 @@ -Fix broken call to `validate_threepid_session` during POST requests for password reset. \ No newline at end of file +Remove POST method for all submit_token endpoints until we implement submit_url functionality. \ No newline at end of file diff --git a/synapse/rest/client/v2_alpha/account.py b/synapse/rest/client/v2_alpha/account.py index a1ace731dea5..afaaeeacdd6f 100644 --- a/synapse/rest/client/v2_alpha/account.py +++ b/synapse/rest/client/v2_alpha/account.py @@ -272,28 +272,6 @@ def on_GET(self, request, medium): request.write(html.encode("utf-8")) finish_request(request) - @defer.inlineCallbacks - def on_POST(self, request, medium): - if medium != "email": - raise SynapseError( - 400, "This medium is currently not supported for password resets" - ) - - body = parse_json_object_from_request(request) - assert_params_in_dict(body, ["sid", "client_secret", "token"]) - - try: - yield self.store.validate_threepid_session( - body["sid"], - body["client_secret"], - body["token"], - self.clock.time_msec(), - ) - return 200, {"success": True} - except ThreepidValidationError: - # Validation failure - return 400, {"success": False} - class PasswordRestServlet(RestServlet): PATTERNS = client_patterns("/account/password$")