-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release-5.26] Backport #2547
[release-5.26] Backport #2547
Commits on Aug 30, 2024
-
Fix TestOCI1IndexChooseInstanceByCompression on non-amd64
Setting SystemContext.ArchitectureChoice to "" does not mean "match any/the first platform"; it's the default behavior of SystemContext, and it means "choose for the current runtime architecture". (Originally discussed in containers#1789 (comment) ) I.e. on amd64 these two test cases are redundant with the first two instances above, and on other architectures (notably ARM) they cause failures. So just drop them. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for a65cb25 - Browse repository at this point
Copy the full SHA a65cb25View commit details -
Use a reasonably unique context key type
This makes the test a tiny bit more realistic, and avoids a linter warning. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 525014b - Browse repository at this point
Copy the full SHA 525014bView commit details -
Validate digests before using them
If doing it makes sense at all, it should happen before the values are used. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 0024e3a - Browse repository at this point
Copy the full SHA 0024e3aView commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for 4c27d4c - Browse repository at this point
Copy the full SHA 4c27d4cView commit details -
Refactor the error handling path of saveStream
Use defer() to remove the temporary file, instead of duplicating the call. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 7ad9240 - Browse repository at this point
Copy the full SHA 7ad9240View commit details -
Refactor the error handling further
Use defer, a nested function, and early returns. Besides being a bit more directly related to what we want to achieve, this now does not call decompressed.Close() on a nil value if DecompressStream fails. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 4746460 - Browse repository at this point
Copy the full SHA 4746460View commit details -
Call .Validate() before digest.Digest.String() if necessary
... to prevent unexpected behavior on invalid values. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 87da25f - Browse repository at this point
Copy the full SHA 87da25fView commit details -
Validate the tags returned by a registry
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for e477fa1 - Browse repository at this point
Copy the full SHA e477fa1View commit details -
Don't abort listing tags when we encounter a digest
Per containers/skopeo#2346, that happens in the wild. Signed-off-by: Miloslav Trmač <mitr@redhat.com> Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 097fa04 - Browse repository at this point
Copy the full SHA 097fa04View commit details