Skip to content

v2.8.44

Choose a tag to compare

@gildas-lormeau gildas-lormeau released this 12 Aug 20:08
· 326 commits to master since this release

What's Changed in v2.8.44

New features

  • New checkCrc32 option in ZipReader and getData() replacing the deprecated checkSignature option. It also verifies the CRC-32 of entries encrypted with AES when the zip file uses the AE-1 format, which stores the real CRC-32 value
  • New checkAuthenticationCode option, enabled by default, controlling the verification of the authentication code of entries encrypted with AES
  • New crc32 option replacing the deprecated signature option when adding entries with passThrough set to true
  • New crc32 property on entries replacing the deprecated signature property. It is undefined when the zip file does not store the CRC-32 value, e.g. for entries encrypted with AES in AE-2 format
  • New ERR_INVALID_CRC32 and ERR_INVALID_AUTHENTICATION_CODE error constants replacing the deprecated ERR_INVALID_SIGNATURE constant. The CRC-32 verification throws the former, the verification of the authentication code of entries encrypted with AES throws the latter. The three constants share the same string value for backward compatibility, the two new constants will become distinct strings in the next minor version

Bug fixes

  • Dates outside the range representable in the NTFS extra field are now clamped to its bounds, i.e. 1601-01-01 and the year 30828 (the maximum signed 64-bit FILETIME value, chosen because Windows and 7-Zip reject or misread values beyond it), instead of overflowing silently to an arbitrary value
  • The last modification date is now truncated to the whole second before rounding odd seconds up to the next even second in the DOS date. Sub-second fractions no longer round the DOS date up, aligning it with Info-ZIP and ditto and keeping it within 1 second of the extended timestamp (see #671)
  • The deprecated signature property of entries encrypted with AES returned by ZipWriter#add() is now undefined, like the new crc32 property, instead of exposing the raw authentication code as a Uint8Array despite being typed as a number

Full Changelog: v2.8.43...v2.8.44