Commit Graph

6 Commits

Author SHA1 Message Date
Miloslav Trmač 04deef6fe6 Call .Validate() before digest.Hex() / digest.Encoded()
... to prevent panics if the value does not contain a :, or other unexpected
values (e.g. a path traversal).

Don't bother on paths where we computed the digest ourselves, or it is already trusted
for other reasons.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-05-09 15:59:32 +02:00
Miloslav Trmač c87ce5b059 Don't call net/url.URL.Parse when we mean net/url.Parse
Fixes a panic per https://github.com/containers/podman/issues/16301 .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-10-26 16:03:03 +02:00
Miloslav Trmač d933303ba6 Convert TestSignatureStorageBaseURL to table-based
Also use require. instead of assert. in a few places.

Other than that, should not change test behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-10-26 16:00:11 +02:00
Miloslav Trmač 3766acbf59 Add lookaside and lookaside-staging, hide sigstore and sigstore-staging
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-11 22:05:13 +02:00
Miloslav Trmač c1a12dccd3 Refer to lookasideStorage instead of signatureStorage in code
... to be consistent and specifically refer to that mechanism
now that there are several.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-11 22:05:13 +02:00
Miloslav Trmač 39f9517723 Rename docker/lookaside.go to docker/registries_d.go
It's not actually dealing with the lookaside; just with the configuration.
And we are going to introduce more configuration.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-07 14:39:50 +02:00