mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-23 17:57:10 +00:00
Fix linter (#3354)
This commit is contained in:
@@ -29,7 +29,7 @@ func AuthorizeAgent(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
parsed, err := token.ParseRequest(c.Request, func(t *token.Token) (string, error) {
|
||||
parsed, err := token.ParseRequest(c.Request, func(_ *token.Token) (string, error) {
|
||||
return secret, nil
|
||||
})
|
||||
switch {
|
||||
|
@@ -55,7 +55,7 @@ func SetUser() gin.HandlerFunc {
|
||||
// this means the user is accessing with a web browser,
|
||||
// so we should implement CSRF protection measures.
|
||||
if t.Kind == token.SessToken {
|
||||
err = token.CheckCsrf(c.Request, func(t *token.Token) (string, error) {
|
||||
err = token.CheckCsrf(c.Request, func(_ *token.Token) (string, error) {
|
||||
return user.Hash, nil
|
||||
})
|
||||
// if csrf token validation fails, exit immediately
|
||||
|
Reference in New Issue
Block a user