mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 12:58:02 +08:00
eadc9b65ed
Wrap req.Body with http.MaxBytesReader before io.ReadAll in CreateAPIKey. Requests with bodies larger than MaxAPIKeyBodySize (4 KiB) now return HTTP 413 instead of buffering arbitrary data. Add the MaxAPIKeyBodySize constant, update the Swagger @Failure annotation to document 413, and add a unit test. Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
53 KiB
53 KiB