mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-09 06:52:23 +00:00
fix: revert git clone http redirection forbidden (#38530)
Revert to 1.26 behavior. Incomplete, HandleGitCmdHTTPRedirection can be improved
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user