mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-04 03:53:25 +09:00
enhance(repo): check full repo name for dangerous operations (#39213)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user