Skip to content

Commit 07a9b47

Browse files
committed
Escape characters in url
1 parent 9bb4d77 commit 07a9b47

File tree

1 file changed

+2
-2
lines changed
  • pkg/cli/image/imagesource

1 file changed

+2
-2
lines changed

pkg/cli/image/imagesource/s3.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func (r *s3Repository) attemptCopy(id string, bucket, key string) bool {
188188
sourceKey = path.Join(copyFrom, id)
189189
}
190190
_, err := r.s3.CopyObject(r.ctx, &s3.CopyObjectInput{
191-
CopySource: aws.String(sourceKey),
191+
CopySource: aws.String(url.QueryEscape(sourceKey)),
192192
Bucket: aws.String(bucket),
193193
Key: aws.String(key),
194194
})
@@ -283,7 +283,7 @@ func (s *s3ManifestService) Put(ctx context.Context, manifest distribution.Manif
283283
if _, err := s.r.s3.CopyObject(s.r.ctx, &s3.CopyObjectInput{
284284
Bucket: aws.String(s.r.bucket),
285285
ContentType: aws.String(mediaType),
286-
CopySource: aws.String(path.Join(s.r.bucket, blob)),
286+
CopySource: aws.String(path.Join(s.r.bucket, url.QueryEscape(blob)),
287287
Key: aws.String(fmt.Sprintf("/v2/%s/manifests/%s", s.r.repoName, tag)),
288288
}); err != nil {
289289
return "", err

0 commit comments

Comments
 (0)