aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/downloader
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-20 06:28:28 +0900
committernsfisis <nsfisis@gmail.com>2026-07-20 06:28:28 +0900
commitde56316efae59dc1bfd517b90bc66611d017a52a (patch)
treef0cbab43bd42def1e198bad2f2039ea9c6c7e5da /crates/shirabe/tests/downloader
parent8b9368a3d2c8cb5b73edc794b77ebd2460d24b06 (diff)
downloadphp-shirabe-de56316efae59dc1bfd517b90bc66611d017a52a.tar.gz
php-shirabe-de56316efae59dc1bfd517b90bc66611d017a52a.tar.zst
php-shirabe-de56316efae59dc1bfd517b90bc66611d017a52a.zip
fix(config): drop insecure git protocol under secure-http
Config::get("github-protocols") ported PHP's array_search over the protocol list via a string-keyed map, but array_search_mixed returns the matched index as PhpMixed::Int, which the as_string() read never matched, so the git protocol was never removed (Config.php:447-449 removes it whenever secure-http is on). Search the list directly and read the index as an Int. Un-ignore test_update_throws_runtime_exception_if_git_command_fails which this had blocked. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/downloader')
-rw-r--r--crates/shirabe/tests/downloader/git_downloader_test.rs8
1 files changed, 0 insertions, 8 deletions
diff --git a/crates/shirabe/tests/downloader/git_downloader_test.rs b/crates/shirabe/tests/downloader/git_downloader_test.rs
index 41852300..748dfb14 100644
--- a/crates/shirabe/tests/downloader/git_downloader_test.rs
+++ b/crates/shirabe/tests/downloader/git_downloader_test.rs
@@ -787,14 +787,6 @@ fn test_update_with_new_repo_url() {
});
}
-#[ignore = "Blocked by a Config bug: Config::get(\"github-protocols\") does not drop the \
- insecure \"git\" protocol under secure-http. array_search_mixed returns the \
- matched index as PhpMixed::Int, but config.rs reads it via as_string (which is \
- Some only for String), so the removal is skipped and get() returns \
- [https, ssh, git] instead of [https, ssh]. The downloader then attempts a third \
- git:// fetch (absent from the process mock) and the error message reads \
- \"via https, ssh, git protocols\", failing the assertion. PHP's new Config() \
- reduces it to two protocols."]
#[serial]
#[test]
fn test_update_throws_runtime_exception_if_git_command_fails() {