mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
chore: fix dependabot alerts (#1501)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
committed by
GitHub
parent
d9e5f33e7e
commit
4d6ca493f2
+6
-6
@@ -850,9 +850,9 @@ func UploadImage(img Image, baseURL, repo string) error {
|
||||
|
||||
cdigest := godigest.FromBytes(cblob)
|
||||
|
||||
if img.Manifest.Config.MediaType == ispec.MediaTypeScratch {
|
||||
cblob = ispec.ScratchDescriptor.Data
|
||||
cdigest = ispec.ScratchDescriptor.Digest
|
||||
if img.Manifest.Config.MediaType == ispec.MediaTypeEmptyJSON {
|
||||
cblob = ispec.DescriptorEmptyJSON.Data
|
||||
cdigest = ispec.DescriptorEmptyJSON.Digest
|
||||
}
|
||||
|
||||
resp, err := resty.R().
|
||||
@@ -1519,9 +1519,9 @@ func UploadImageWithBasicAuth(img Image, baseURL, repo, user, password string) e
|
||||
|
||||
cdigest := godigest.FromBytes(cblob)
|
||||
|
||||
if img.Manifest.Config.MediaType == ispec.MediaTypeScratch {
|
||||
cblob = ispec.ScratchDescriptor.Data
|
||||
cdigest = ispec.ScratchDescriptor.Digest
|
||||
if img.Manifest.Config.MediaType == ispec.MediaTypeEmptyJSON {
|
||||
cblob = ispec.DescriptorEmptyJSON.Data
|
||||
cdigest = ispec.DescriptorEmptyJSON.Digest
|
||||
}
|
||||
|
||||
resp, err := resty.R().
|
||||
|
||||
Reference in New Issue
Block a user