mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-29 15:39:00 +03:00
Merge pull request #5658 from matrix-org/babolivier/is-json
Send 3PID bind requests as JSON data
This commit is contained in:
commit
8ab3444fdf
2 changed files with 2 additions and 1 deletions
1
changelog.d/5658.bugfix
Normal file
1
changelog.d/5658.bugfix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Fix 3PID bind requests being sent to identity servers as `application/x-form-www-urlencoded` data, which is deprecated.
|
|
@ -118,7 +118,7 @@ class IdentityHandler(BaseHandler):
|
||||||
raise SynapseError(400, "No client_secret in creds")
|
raise SynapseError(400, "No client_secret in creds")
|
||||||
|
|
||||||
try:
|
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"),
|
"https://%s%s" % (id_server, "/_matrix/identity/api/v1/3pid/bind"),
|
||||||
{"sid": creds["sid"], "client_secret": client_secret, "mxid": mxid},
|
{"sid": creds["sid"], "client_secret": client_secret, "mxid": mxid},
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue