api-platform / api-platform/core

Input size validation

Đang mở
#7,978 5 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
PHP
Star
2.6k
Fork
980
Merge trung bình
2 ngày 5 giờ
Pull request đã merge (30 ngày)
48

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.