mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-19 09:31:35 +03:00
Fix to keep the signature valid for the request. (#4480)
This commit is contained in:
parent
da757b7759
commit
2712a9ef8f
1 changed files with 9 additions and 6 deletions
|
@ -169,12 +169,6 @@ class IdentityHandler(BaseHandler):
|
||||||
# deletion request to.
|
# deletion request to.
|
||||||
id_server = next(iter(self.trusted_id_servers))
|
id_server = next(iter(self.trusted_id_servers))
|
||||||
|
|
||||||
# if we have a rewrite rule set for the identity server,
|
|
||||||
# apply it now.
|
|
||||||
if id_server in self.rewrite_identity_server_urls:
|
|
||||||
id_server = self.rewrite_identity_server_urls[id_server]
|
|
||||||
|
|
||||||
url = "https://%s/_matrix/identity/api/v1/3pid/unbind" % (id_server,)
|
|
||||||
content = {
|
content = {
|
||||||
"mxid": mxid,
|
"mxid": mxid,
|
||||||
"threepid": threepid,
|
"threepid": threepid,
|
||||||
|
@ -191,6 +185,15 @@ class IdentityHandler(BaseHandler):
|
||||||
content=content,
|
content=content,
|
||||||
destination_is=id_server,
|
destination_is=id_server,
|
||||||
)
|
)
|
||||||
|
# if we have a rewrite rule set for the identity server,
|
||||||
|
# apply it now.
|
||||||
|
#
|
||||||
|
# Note that destination_is has to be the real id_server, not
|
||||||
|
# the server we connect to.
|
||||||
|
if id_server in self.rewrite_identity_server_urls:
|
||||||
|
id_server = self.rewrite_identity_server_urls[id_server]
|
||||||
|
|
||||||
|
url = "https://%s/_matrix/identity/api/v1/3pid/unbind" % (id_server,)
|
||||||
try:
|
try:
|
||||||
yield self.http_client.post_json_get_json(
|
yield self.http_client.post_json_get_json(
|
||||||
url,
|
url,
|
||||||
|
|
Loading…
Reference in a new issue