From 794515d242471b49ddd0550592f175e32db91cb7 Mon Sep 17 00:00:00 2001 From: Daniel Meppiel <51440732+danielmeppiel@users.noreply.github.com> Date: Tue, 16 Sep 2025 13:59:41 +0200 Subject: [PATCH] Update src/apm_cli/models/apm_package.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/apm_cli/models/apm_package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apm_cli/models/apm_package.py b/src/apm_cli/models/apm_package.py index 239d8e1..7817199 100644 --- a/src/apm_cli/models/apm_package.py +++ b/src/apm_cli/models/apm_package.py @@ -125,8 +125,8 @@ class DependencyReference: # For any other format, try both github.com/ prefix and user/repo formats # Let urllib.parse handle the validation instead of unsafe string operations candidate_urls = [ - f"https://{repo_url}", # Handles github.com/user/repo format - f"https://github.com/{repo_url}" # Handles user/repo format + urllib.parse.urljoin("https://", repo_url), # Handles github.com/user/repo format + urllib.parse.urljoin("https://github.com/", repo_url) # Handles user/repo format ] parsed_url = None