Lack of protection against CSRF attacks
未关闭
- 主要语言
- Go
- 星标
- 10.8k
- 派生
- 1.3k
- 平均合并
- 2 天 36 分钟
- 30 天内合并 PR
- 26
描述
Hi,
The content-type "multipart/form-data" is enabled by default for POST requests, besides application/json.
I don't want to disable it because I am using it for file uploads.
This is now a security issue, as this makes the API vulnerable to CSRF requests by changing the content type of queries.
See [https://owasp.org/www-community/attacks/csrf] for more information.
Is there a way to enable other content types besides application/JSON for specific actions like file upload?
Is there a plan to implement CSRF tokens?
I've attached an example (change the IP address to yours in the HTML):
```
GQLGen CSRF PoC
history.pushState('', '', '/');
```
贡献指南
评估
这个 Issue 还没有评估数据。