enhance(repo): check full repo name for dangerous operations (#39213)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Mitrahsoft
2026-09-02 17:07:04 +00:00
committed by GitHub
co-authored by wxiaoguang
parent f735df4dee
commit 8cf7330556
8 changed files with 67 additions and 70 deletions
+1 -1
View File
@@ -187,7 +187,7 @@ func testUIDeleteBranch(t *testing.T, session *TestSession, ownerName, repoName,
func testDeleteRepository(t *testing.T, session *TestSession, ownerName, repoName string) {
relURL := "/" + path.Join(ownerName, repoName, "settings")
req := NewRequestWithValues(t, "POST", relURL+"?action=delete", map[string]string{
"repo_name": repoName,
"repo_name": ownerName + "/" + repoName,
})
resp := session.MakeRequest(t, req, http.StatusOK)
assert.NotNil(t, test.ParseJSONRedirect(resp.Body.Bytes()).Redirect)