From a622c47bd32e4c7d8d6cd12ba8c7556fcc492524 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Fri, 26 Jul 2024 14:10:18 -0700 Subject: [PATCH] fix nil deref in auth.go --- server/auth.go | 2 +- server/upload.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/auth.go b/server/auth.go index e92a5b65..dcef5bf9 100644 --- a/server/auth.go +++ b/server/auth.go @@ -67,7 +67,7 @@ func getAuthorizationToken(ctx context.Context, challenge registryChallenge) (st headers.Add("Authorization", signature) - response, err := makeRequest(ctx, http.MethodGet, redirectURL, headers, nil, nil) + response, err := makeRequest(ctx, http.MethodGet, redirectURL, headers, nil, ®istryOptions{}) if err != nil { return "", err } diff --git a/server/upload.go b/server/upload.go index 73ce78ce..c4078c22 100644 --- a/server/upload.go +++ b/server/upload.go @@ -254,7 +254,7 @@ func (b *blobUpload) uploadPart(ctx context.Context, method string, requestURL * // retry uploading to the redirect URL for try := range maxRetries { - err = b.uploadPart(ctx, http.MethodPut, redirectURL, part, nil) + err = b.uploadPart(ctx, http.MethodPut, redirectURL, part, ®istryOptions{}) switch { case errors.Is(err, context.Canceled): return err