What version of Go are you using (go version)?
$ go version
go version go1.17 darwin/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
What did you do?
Before 1.17, if a zip file's central directory entry's CRC32 value was different to it's data descriptor entry, ErrChecksum would be returned.
I've written a test with such behaviour. This fails with 1.17, but succeeds for 1.16.
https://play.golang.org/p/103JOqe-uKp
What did you expect to see?
I don't think it was intentional for this to be changed, therefore, both CRC32 entries should still be checked against each other.
What did you see instead?
If a data descriptor is present, only it's CRC32 field is taken into consideration.
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env)?go envOutputWhat did you do?
Before 1.17, if a zip file's central directory entry's CRC32 value was different to it's data descriptor entry,
ErrChecksumwould be returned.I've written a test with such behaviour. This fails with 1.17, but succeeds for 1.16.
https://play.golang.org/p/103JOqe-uKp
What did you expect to see?
I don't think it was intentional for this to be changed, therefore, both CRC32 entries should still be checked against each other.
What did you see instead?
If a data descriptor is present, only it's CRC32 field is taken into consideration.