Refactor CSRF token (#32216)
This commit is contained in:
parent
368b0881f5
commit
dd83cfcacc
29 changed files with 90 additions and 126 deletions
|
@ -54,7 +54,7 @@ func testRenameBranch(t *testing.T, u *url.URL) {
|
|||
assert.Equal(t, "main", repo1.DefaultBranch)
|
||||
|
||||
// create branch1
|
||||
csrf := GetCSRF(t, session, "/user2/repo1/src/branch/main")
|
||||
csrf := GetUserCSRFToken(t, session)
|
||||
|
||||
req = NewRequestWithValues(t, "POST", "/user2/repo1/branches/_new/branch/main", map[string]string{
|
||||
"_csrf": csrf,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue