mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-08 14:03:24 +09:00
enhance(repo): check full repo name for dangerous operations (#39213)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -388,7 +388,7 @@ func testForkToEditFile(t *testing.T, session *TestSession, user, owner, repo, b
|
||||
// Archive the repository
|
||||
req := NewRequestWithValues(t, "POST", "/"+path.Join(user, repo, "settings"),
|
||||
map[string]string{
|
||||
"repo_name": repo,
|
||||
"repo_name": user + "/" + repo,
|
||||
"action": "archive",
|
||||
},
|
||||
)
|
||||
@@ -402,7 +402,7 @@ func testForkToEditFile(t *testing.T, session *TestSession, user, owner, repo, b
|
||||
// Unfork the repository
|
||||
req = NewRequestWithValues(t, "POST", "/"+path.Join(user, repo, "settings"),
|
||||
map[string]string{
|
||||
"repo_name": repo,
|
||||
"repo_name": user + "/" + repo,
|
||||
"action": "convert_fork",
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user