From 09d8aab93b090ada901f150dbbb60b46b17ee629 Mon Sep 17 00:00:00 2001 From: Joe Citrine Date: Tue, 17 Feb 2026 23:34:15 +0000 Subject: [PATCH] fix(resolver): port parser does not handle leading ':' conditionally trim the leading colon --- src/service/resolver/actual.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/service/resolver/actual.rs b/src/service/resolver/actual.rs index 9fd8af449..31f2a7ed1 100644 --- a/src/service/resolver/actual.rs +++ b/src/service/resolver/actual.rs @@ -117,7 +117,7 @@ fn actual_dest_1(host_port: FedDest) -> Result { async fn actual_dest_2(&self, dest: &ServerName, cache: bool, pos: usize) -> Result { debug!("2: Hostname with included port"); let (host, port) = dest.as_str().split_at(pos); - self.conditional_query_and_cache(host, port.parse::().unwrap_or(8448), cache) + self.conditional_query_and_cache(host, port.trim_start_matches(':').parse::().unwrap_or(8448), cache) .await?; Ok(FedDest::Named( @@ -163,7 +163,7 @@ async fn actual_dest_3_2( ) -> Result { debug!("3.2: Hostname with port in .well-known file"); let (host, port) = delegated.split_at(pos); - self.conditional_query_and_cache(host, port.parse::().unwrap_or(8448), cache) + self.conditional_query_and_cache(host, port.trim_start_matches(':').parse::().unwrap_or(8448), cache) .await?; Ok(FedDest::Named(