Refactor CSRF token (#32216)
This commit is contained in:
parent
368b0881f5
commit
dd83cfcacc
29 changed files with 90 additions and 126 deletions
|
@ -17,7 +17,7 @@ import (
|
|||
|
||||
func setDefaultBranch(t *testing.T, session *TestSession, user, repo, branch string) {
|
||||
location := path.Join("/", user, repo, "settings/branches")
|
||||
csrf := GetCSRF(t, session, location)
|
||||
csrf := GetUserCSRFToken(t, session)
|
||||
req := NewRequestWithValues(t, "POST", location, map[string]string{
|
||||
"_csrf": csrf,
|
||||
"action": "default_branch",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue