mirror of
https://github.com/go-gitea/gitea
synced 2025-07-10 04:27:22 +00:00
Refactor CSRF token (#32216)
This commit is contained in:
@ -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",
|
||||
|
Reference in New Issue
Block a user