fix: revert git clone http redirection forbidden (#38530) (#38545)

backport #38530
This commit is contained in:
wxiaoguang
2026-07-20 17:21:17 +02:00
committed by GitHub
parent 148d528814
commit 9731ad7c3c
4 changed files with 24 additions and 10 deletions
+1
View File
@@ -26,6 +26,7 @@ func TestRepoIsEmpty(t *testing.T) {
// TestCloneRefusesRedirects ensures Clone never follows HTTP redirects, so a remote
// cannot redirect to an otherwise-blocked address (SSRF, e.g. during migration).
func TestCloneRefusesRedirects(t *testing.T) {
t.Skip("FIXME: GIT-CLONE-HTTP-REDIRECT-SSRF: need a complete solution in the future")
var targetHit atomic.Bool
target := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
targetHit.Store(true)