distribution/registry
Jose D. Gomez R 521ea3d973
Fix runaway allocation on /v2/_catalog
Introduced a Catalog entry in the configuration struct. With it,
it's possible to control the maximum amount of entries returned
by /v2/catalog (`GetCatalog` in registry/handlers/catalog.go).

It's set to a default value of 1000.

`GetCatalog` returns 100 entries by default if no `n` is
provided. When provided it will be validated to be between `0`
and `MaxEntries` defined in Configuration. When `n` is outside
the aforementioned boundary, ErrorCodePaginationNumberInvalid is
returned.

`GetCatalog` now handles `n=0` gracefully with an empty response
as well.

Signed-off-by: José D. Gómez R. <1josegomezr@gmail.com>
Co-authored-by: Cory Snider <corhere@gmail.com>
2023-04-24 18:53:43 +02:00
..
api Fix runaway allocation on /v2/_catalog 2023-04-24 18:53:43 +02:00
auth default autoredirect to false 2019-01-04 13:47:17 -08:00
client Fix gosimple checks 2021-03-23 21:03:20 +08:00
handlers Fix runaway allocation on /v2/_catalog 2023-04-24 18:53:43 +02:00
listener [Server] Listen and serve on a unix socket 2015-05-11 16:00:14 +03:00
middleware context: remove definition of Context 2017-08-11 15:53:31 -07:00
proxy Fix gometalint errors 2021-03-23 21:03:10 +08:00
storage Remove err nil check 2021-03-23 21:03:16 +08:00
doc.go Move initialization code from main.go to the registry package 2015-09-09 14:39:31 -07:00
registry.go Merge pull request #3384 from wy65701436/release/2.7-cp-3169 2021-03-23 15:23:04 +00:00
registry_test.go Added flag for user configurable cipher suites 2021-03-23 18:42:12 +08:00
root.go add possibility to clean untagged manifests 2018-01-05 12:20:01 +02:00