mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 02:46:04 +01:00 
			
		
		
		
	Send error message when CSRF token is missing (#13676)
This commit is contained in:
		| @@ -169,7 +169,7 @@ func (ctx *APIContext) RequireCSRF() { | ||||
| 	if len(headerToken) > 0 || len(formValueToken) > 0 { | ||||
| 		csrf.Validate(ctx.Context.Context, ctx.csrf) | ||||
| 	} else { | ||||
| 		ctx.Context.Error(401) | ||||
| 		ctx.Context.Error(401, "Missing CSRF token.") | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user