make sure destination only contains the hostname value and not whole URL

When testing this, the public URL is containing the protocol "https://" which differs from synapse's values. This code makes sure to remove that extra data to signatures match. Is there ever a situation in which the public url is any different?
This commit is contained in:
eyecreate
2019-10-21 14:31:40 -04:00
committed by GitHub
parent 36f22e5ca6
commit 5ca666981a

View File

@@ -284,7 +284,7 @@ public class SessionManager {
jsonObject.addProperty("method", "POST");
jsonObject.addProperty("uri", "/_matrix/identity/api/v1/3pid/unbind");
jsonObject.addProperty("origin", origin);
jsonObject.addProperty("destination_is", cfg.getServer().getPublicUrl());
jsonObject.addProperty("destination_is", URI.create(cfg.getServer().getPublicUrl()).getHost());
jsonObject.add("content", reqData);
String canonical = MatrixJson.encodeCanonical(jsonObject);