mirror of https://github.com/helm/helm
internal/chart/v3/util/save.go assigned gzip.Writer.Extra the 41-byte string "+aHR0cHM6Ly95b3V0dS5iZS96OVV6MWljandyTQo=", which is not a valid FEXTRA payload. RFC 1952 section 2.3.1.1 requires every subfield to be SI1, SI2, a 2-byte little-endian LEN, and then LEN bytes of data. Parsed that way those bytes give SI1='+', SI2='a' and LEN=21064 while only 37 bytes remain, so strict readers reject every archive the v3 writer produces. Go's compress/gzip does not parse subfields, so nothing in the tree noticed. pkg/chart/v2/util/save.go had the identical defect. It was fixed in #31884 for issue #31844, "helm package produces malformed .tgz", where the Bazel downloader failed with "Extra subfield lenght exceeds remaining bytes in extra: 21064 > 37". The v3 writer was never updated. Use the same header bytes the v2 writer now uses: SI1 and SI2 of 'r', LEN 0x0028, and the unchanged 40-byte payload. Both writers now emit byte-identical, well-formed extra fields. Adds the v2 regression test to the v3 package. Signed-off-by: Max Freedom Pollard <272618364+MaxFreedomPollard@users.noreply.github.com>pull/32629/head
parent
fa11636b01
commit
5e87f7dad4
Loading…
Reference in new issue