api-platform / api-platform/core

Input size validation

未關閉
#7,978 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
PHP
星號
2.6k
分支
980
平均合併
2 天 5 小時
30 天內合併 PR
48

描述

Hello,

While browsing the OWASP website, I've stumbled upon [the following interesting recommendation](https://www.owasp.org/index.php/REST_Security_Cheat_Sheet#Input_validation) that isn't, in my knowledge, covered by the API Platform:

> Define an appropriate request size limit and reject requests exceeding the limit with HTTP response status 413 Request Entity Too Large

I believe it would be quite achievable to provide a listener checking for the request content size against a configured threshold and return an appropriate response when necessary.

Is this already covered in API platform?
If not, why?

If that's of interest, I'd be happy working on the implementation.

Best Regards.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。