summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Kösters <timo@koesters.xyz>2023-02-23 16:12:58 +0100
committerTimo Kösters <timo@koesters.xyz>2023-03-13 10:39:19 +0100
commit27f29ba69911fc2de240bafe165024fc8ce5ea5e (patch)
tree27d65848affff55a5c8e964968457e19f0027ae8 /src
parentcb0ce5b08f8d9e68aad51478d745730e92b2cdba (diff)
downloadconduit-27f29ba69911fc2de240bafe165024fc8ce5ea5e.zip
fix: SRV lookups should end with a period
Diffstat (limited to 'src')
-rw-r--r--src/api/server_server.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/server_server.rs b/src/api/server_server.rs
index 422da47..3a6da4f 100644
--- a/src/api/server_server.rs
+++ b/src/api/server_server.rs
@@ -472,10 +472,11 @@ async fn find_actual_destination(destination: &'_ ServerName) -> (FedDest, FedDe
}
async fn query_srv_record(hostname: &'_ str) -> Option<FedDest> {
+ let hostname = hostname.trim_end_matches('.');
if let Ok(Some(host_port)) = services()
.globals
.dns_resolver()
- .srv_lookup(format!("_matrix._tcp.{hostname}"))
+ .srv_lookup(format!("_matrix._tcp.{hostname}."))
.await
.map(|srv| {
srv.iter().next().map(|result| {