Merge pull request #4 from eyecreate/patch-1
make sure destination only contains the hostname value and not whole URL
This commit is contained in:
@@ -57,6 +57,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Base64;
|
||||
import java.util.Calendar;
|
||||
@@ -284,7 +285,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);
|
||||
|
Reference in New Issue
Block a user