From 57e9795455428fa7d79190675d96869142fdef41 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 2 Oct 2024 16:13:01 +0200 Subject: [PATCH] Fix issue downloading from codeload.github.com when using basic-auth for github, fixes #12126 --- src/Composer/Util/Url.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Util/Url.php b/src/Composer/Util/Url.php index 040d17db0..32f61347b 100644 --- a/src/Composer/Util/Url.php +++ b/src/Composer/Util/Url.php @@ -75,7 +75,7 @@ class Url $origin .= ':'.$port; } - if (strpos($origin, '.github.com') === (strlen($origin) - 11)) { + if (str_ends_with($origin, '.github.com') && $origin !== 'codeload.github.com') { return 'github.com'; }