summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/context/api.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/context/api.go b/modules/context/api.go
index b5f521f63c..aa4b6b9e89 100644
--- a/modules/context/api.go
+++ b/modules/context/api.go
@@ -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.")
}
}