mirror of
https://github.com/distribution/distribution.git
synced 2025-09-01 15:07:25 +00:00
Before allowing a schema1 manifest to be stored in the registry, ensure that it
contains equal length History and FSLayer arrays. This is required to prevent malformed manifests being put to the registry and failing external verification checks. Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
This commit is contained in:
@@ -131,6 +131,9 @@ func checkExerciseRepository(t *testing.T, repository distribution.Repository) {
|
||||
m.FSLayers = append(m.FSLayers, schema1.FSLayer{
|
||||
BlobSum: dgst,
|
||||
})
|
||||
m.History = append(m.History, schema1.History{
|
||||
V1Compatibility: "",
|
||||
})
|
||||
|
||||
// Then fetch the blobs
|
||||
if rc, err := blobs.Open(ctx, dgst); err != nil {
|
||||
|
Reference in New Issue
Block a user