Enforce HTTPS for DNS SRV lookup

This commit is contained in:
Maxime Dor
2017-02-09 13:20:10 +01:00
parent d3d790f00b
commit 0a9cf8009b

View File

@@ -66,7 +66,7 @@ class DnsLookupProvider extends RemoteIdentityServerProvider {
for (SRVRecord record : records) {
log.info("Found SRV record: {}", record.toString())
String baseUrl = (record.getPort() != 80 ? "https://" : "http://") + record.getTarget().toString(true)
String baseUrl = "https://${record.getTarget().toString(true)}:${record.getPort()}"
Optional<?> answer = find(baseUrl, type, threePid)
if (answer.isPresent()) {
return answer