-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Description
I secure the app with the csrf middleware:
e.Use(middleware.CSRFWithConfig(middleware.CSRFConfig{
TokenLookup: "form:" + echo.HeaderXCSRFToken,
}))
and then I make a post request without providing the csrf token.
Checklist
- Dependencies installed
- No typos
- Searched existing issues and docs
Expected behaviour
I would expect a 400 or 401 error, since it's the client fault that the request failed.
Actual behaviour
I get a 500 error, which is misleading.
Working code to debug
The culprit is here:
Line 143 in 412823e
| return err |
It's just returning the error, without wrapping it in an httperror like two lines below
Version/commit
master