From f47b5629052008a98185d206d5d9806555b556c7 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 d23ef95a..a4326839 100644 --- a/src/service/resolver/actual.rs +++ b/src/service/resolver/actual.rs @@ -119,7 +119,7 @@ impl super::Service { 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( @@ -165,7 +165,7 @@ impl super::Service { ) -> 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(