From cf17761c6e3fbf9ba7b2af02ce614c90eabf1dea Mon Sep 17 00:00:00 2001 From: Cyborus Date: Tue, 5 Nov 2024 13:41:54 -0500 Subject: fix: incorrect string slicing in ssh url parsing --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index b388fab..a9c6b36 100644 --- a/src/main.rs +++ b/src/main.rs @@ -149,7 +149,7 @@ fn ssh_url_parse(s: &str) -> Result { let auth_end = s.find("@").unwrap_or(0); new_s.push_str(&s[..auth_end]); - new_s.push_str(&s[..auth_end].replacen(":", "/", 1)); + new_s.push_str(&s[auth_end..].replacen(":", "/", 1)); url::Url::parse(&new_s) }) } -- cgit v1.2.3