mirror of
https://github.com/go-gitea/gitea
synced 2025-07-07 02:57:20 +00:00
Refactor CSRF token (#32216)
This commit is contained in:
@ -29,7 +29,7 @@ func TestPullCreate_CommitStatus(t *testing.T) {
|
||||
url := path.Join("user1", "repo1", "compare", "master...status1")
|
||||
req := NewRequestWithValues(t, "POST", url,
|
||||
map[string]string{
|
||||
"_csrf": GetCSRF(t, session, url),
|
||||
"_csrf": GetUserCSRFToken(t, session),
|
||||
"title": "pull request from status1",
|
||||
},
|
||||
)
|
||||
@ -129,7 +129,7 @@ func TestPullCreate_EmptyChangesWithDifferentCommits(t *testing.T) {
|
||||
url := path.Join("user1", "repo1", "compare", "master...status1")
|
||||
req := NewRequestWithValues(t, "POST", url,
|
||||
map[string]string{
|
||||
"_csrf": GetCSRF(t, session, url),
|
||||
"_csrf": GetUserCSRFToken(t, session),
|
||||
"title": "pull request from status1",
|
||||
},
|
||||
)
|
||||
@ -152,7 +152,7 @@ func TestPullCreate_EmptyChangesWithSameCommits(t *testing.T) {
|
||||
url := path.Join("user1", "repo1", "compare", "master...status1")
|
||||
req := NewRequestWithValues(t, "POST", url,
|
||||
map[string]string{
|
||||
"_csrf": GetCSRF(t, session, url),
|
||||
"_csrf": GetUserCSRFToken(t, session),
|
||||
"title": "pull request from status1",
|
||||
},
|
||||
)
|
||||
|
Reference in New Issue
Block a user