Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5658 from matrix-org/babolivier/is-json
Browse files Browse the repository at this point in the history
Send 3PID bind requests as JSON data
  • Loading branch information
babolivier authored Jul 10, 2019
2 parents 953dbb7 + b2a2e96 commit 8ab3444
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/5658.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix 3PID bind requests being sent to identity servers as `application/x-form-www-urlencoded` data, which is deprecated.
2 changes: 1 addition & 1 deletion synapse/handlers/identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def bind_threepid(self, creds, mxid):
raise SynapseError(400, "No client_secret in creds")

try:
data = yield self.http_client.post_urlencoded_get_json(
data = yield self.http_client.post_json_get_json(
"https://%s%s" % (id_server, "/_matrix/identity/api/v1/3pid/bind"),
{"sid": creds["sid"], "client_secret": client_secret, "mxid": mxid},
)
Expand Down

0 comments on commit 8ab3444

Please sign in to comment.