Skip to content

Commit 6747ae8

Browse files
authored
fix: disable server side checksum (#2519)
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
1 parent 43149f4 commit 6747ae8

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

pkg/blobmanager/s3/backend.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,10 @@ func (b *Backend) Upload(ctx context.Context, r io.Reader, resource *pb.CASResou
164164
},
165165
}
166166

167-
if b.checksumVerificationEnabled() {
168-
// Check that the object is uploaded correctly
169-
input.ChecksumSHA256 = aws.String(hexSha256ToBinaryB64(resource.Digest))
170-
}
167+
// if b.checksumVerificationEnabled() {
168+
// // Check that the object is uploaded correctly
169+
// input.ChecksumSHA256 = aws.String(hexSha256ToBinaryB64(resource.Digest))
170+
// }
171171

172172
if _, err := uploader.Upload(ctx, input); err != nil {
173173
return fmt.Errorf("failed to upload to bucket: %w", err)

pkg/blobmanager/s3/backend_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@ func (s *testSuite) TestDownload() {
246246
s.Equal("test", buf.String())
247247
})
248248

249-
s.T().Run("it's been tampered", func(t *testing.T) {
250-
buf := bytes.NewBuffer(nil)
251-
err := s.backend.Download(context.Background(), buf, s.tamperedObjectDigest)
252-
s.ErrorContains(err, "failed to validate integrity of object")
253-
})
249+
// s.T().Run("it's been tampered", func(t *testing.T) {
250+
// buf := bytes.NewBuffer(nil)
251+
// err := s.backend.Download(context.Background(), buf, s.tamperedObjectDigest)
252+
// s.ErrorContains(err, "failed to validate integrity of object")
253+
// })
254254
}
255255

256256
type testSuite struct {

0 commit comments

Comments
 (0)