diff --git a/context/context.go b/context/context.go index bbd58299..e1262018 100644 --- a/context/context.go +++ b/context/context.go @@ -169,11 +169,11 @@ func (ctx *Context) CheckXSRFCookie() bool { token = ctx.Request.Header.Get("X-Csrftoken") } if token == "" { - ctx.Abort(403, "'_xsrf' argument missing from POST") + ctx.Abort(422, "422") return false } if ctx._xsrfToken != token { - ctx.Abort(403, "XSRF cookie does not match POST argument") + ctx.Abort(417, "417") return false } return true