Act nowcan affect a running system
ZIP encryption lands with metadata and authentication safeguards
Password-protected ZIP support arrives with several same-day corrections for malformed metadata, authentication and extraction lengths. AES-NI batching accelerates bulk encryption. Long-running services also gain process-thread logging cleanup, while PUREMORMOT2 users must update a renamed process option.
TL;DR
- Include mormot.crypt.zip to enable ZIP password support; do not stop at the initial feature commit.
- ZIP readers validate AES and ZIP64 metadata and authenticate file-backed AES before plaintext output.
- TExternalProcess releases TSynLog thread numbers after each worker ends.
- Replace roWinJobCloseChildren with roCloseChildren for PUREMORMOT2 builds.
Upgrade advice
For this historical batch, take the complete 2.4.18103 sequence, not the initial ZIP feature alone. Test malformed archives, failed extraction cleanup and encrypted-file interoperability. The payload contains no superseded_by links; this is not a claim that no later fixes exist.
17 of 17 entries · 21 commits upstream
1
High
ZIP64 and Unicode path metadata are checked before use
TZipRead validates Unicode Path length, version and filename CRC, checks required ZIP64 extra bytes, rejects inconsistent encrypted stored sizes and authenticates encrypted empty entries.
Security
mormot.core.zip
ba28eaa3+63-37
core: enhanced TZipRead process
Impact
Malformed ZIP metadata is rejected by Delphi/FPC readers; stale Unicode name metadata is ignored rather than trusted.
Worth a look
Units
2
High
File-backed AES archives authenticate before plaintext output
TZipRead.CryptAuthenticate verifies file-backed ciphertext before UnZipStream emits plaintext. Encrypted zero-length entries also pass through authentication.
Security
mormot.core.zip
ca2e7ad2+58-11
core: add pre-authentication for file-backed ZIP AES streaming
Impact
Consumers of Delphi/FPC extraction streams do not receive file-backed AES plaintext before its authentication check succeeds.
Worth a look
Units
3
High
ZIP extraction validates stored and inflated lengths
TZipRead.CryptPrepare checks unencrypted stored sizes as well as encrypted sizes. UnZipStream verifies final inflated length, and TZipWrite.Destroy handles an uninitialized destination.
Security
mormot.core.zip
d7cd527d+32-20
core: hardened TZipRead
Impact
Delphi/FPC import services reject inconsistent ZIP sizes instead of accepting invalid stored entries or AES-authenticated compressed data with a wrong output length.
Worth a look
Units
4
High
Malformed AES extra fields are rejected
TFileHeader.LocateExtra bounds every extra field; TZipRead requires the encrypted flag, seven-byte AES payload, supported version, vendor, strength and compression method.
Security
mormot.core.zip
dbdfeb83+19-7
core: validate Zip AES extra-field boundaries and values
Impact
Delphi/FPC ZIP readers fail early on malformed AES headers rather than reading unchecked extra-field data.
Worth a look
Units
5
High
Repeated process launches release their logging thread slots
TExternalProcessThread.Execute calls the new NotifyThreadEnded hook in finally and moves thread naming inside cleanup protection.
Fixes
mormot.core.os+1
dadb7a01+69-2
core: TExternalProcess thread releases its TSynLog thread number
Impact
Long-running Delphi/FPC services stop leaking one TSynLog thread number per Start; naming failures no longer skip completion signaling.
Worth a look
Public API
NotifyThreadEndedadded
6
Medium
The child-process cleanup option gets a platform-neutral name
TRunOptions renames roWinJobCloseChildren to roCloseChildren. A compatibility alias remains only when PUREMORMOT2 is not defined.
Breaking changes
mormot.core.os+1
07689a2c+26-18
core: renamed roWinJobCloseChildren as roCloseChildren
Impact
Existing Delphi/FPC code using the old name must migrate for PUREMORMOT2 builds; child-process cleanup behavior is not newly introduced by this rename.
Migration required
Search for roWinJobCloseChildren and replace it with roCloseChildren, especially in PUREMORMOT2 builds.
Public API
roWinJobCloseChildrenrenamed
7
Medium
Unquoted include filenames can be followed by comments
TPreproc.DoInclude stops an unquoted filename at a whitespace-prefixed // comment while preserving quoted filename parsing.
Fixes
mormot.core.fmt
ea166467+19-5
core: fixed JOP recognize // comments after unquoted include filenames
Impact
Delphi/FPC JOP users can annotate unquoted includes without accidentally opening a filename containing the comment.
Worth a look
Units
8
Medium
Failed ZIP extraction removes incomplete destination files
The filename overload of TZipRead.UnZip deletes the destination when UnZipStream returns false and sets its timestamp only after success.
Fixes
mormot.core.zip
fb77cfee+6-3
core: TZipRead.UnZip delete aborted/invalid files
Impact
Delphi/FPC extraction jobs no longer leave a partial or invalid file when the stream extraction reports failure.
Worth a look
Public API
TZipRead.UnZipbehaviour-changed
Units
9
Medium
ZIP readers and writers gain password encryption
TZipAbstract.Password, TZipWrite.Encryption, TZipCrypt and ZipCryptClass register password support through the new mormot.crypt.zip unit with TZipCryptPkware and TZipCryptAes.
New features
mormot.core.zip+1
e5f68ef2+1078-97
mormot.core.zip: add ZipCrypto and WinZip AES-256 password support
Impact
Delphi/FPC services can read and write encrypted ZIPs after including mormot.crypt.zip. ZipCrypto is legacy weak encryption; AES streaming is supported, but ZipCrypto AddDeflatedStream is rejected.
Worth a look
Public API
TZipAbstract.PasswordaddedTZipWrite.EncryptionaddedTZipEncryptionaddedTZipCryptaddedZipCryptClassaddedTZipCryptPkwareaddedTZipCryptAesadded
10
Medium
AES ZIP writing retains CRC for files of at least 20 bytes
TZipWrite selects AE-1 with CRC32 for inputs of at least 20 bytes and AE-2 without CRC32 for smaller inputs, including streaming compression.
New features
mormot.core.zip
99109b0b+110-7
core: follow WinZip 11 and use AE-1 with crc storage
Impact
New encrypted archives change their AES metadata and CRC policy; Delphi/FPC code should test interoperability with its actual extraction tools.
Worth a look
Public API
TZipWritebehaviour-changed
Units
11
Medium
AES-NI transforms four independent blocks together
TAes.DoBlocks dispatches groups of four blocks to new x86/x64 AES-NI assembly and handles the remaining zero to three blocks normally.
Performance
mormot.crypt.core
3cc6cc26+547-2
crypt: 4x interleaved AES-NI asm for TAes.DoBlocks
Impact
Bulk AES callers on Delphi/FPC x86 and x64 gain a hardware-accelerated path without changing their public calls.
Units
12
Medium
ZIP pre-authentication skips unnecessary AES work
TZipCrypt.Decrypt gains AuthOnly; TZipCryptAes updates HMAC without decrypting on that path. Salt generation uses Random128 and temporary key material is cleared.
Performance
mormot.core.zip+1
fd6b3fa5+38-24
crypt: enhanced/refactored zip encryption
Impact
File-backed AES verification costs less CPU. Custom TZipCrypt descendants must match the extended virtual Decrypt signature.
Worth a look
Public API
TZipCrypt.Decryptsignature-changed
13
Medium
ZIP AES processes counter blocks in batches
TZipCryptAes fills 64 AES counter blocks at once and uses TAes.DoBlocks; 32-bit builds reject counter wraparound.
Performance
mormot.crypt.zip
8f054b58+35-16
crypt: (much) faster #730 .zip cryptography
Impact
Delphi/FPC ZIP encryption can use AES-NI batching on supported Intel-compatible CPUs; no format change is introduced here.
Units
14
Low
The thread-end hook becomes an optional method callback
NotifyThreadEnded becomes a nullable TThreadMethod bound directly to TSynLog.NotifyThreadEnded; TExternalProcessThread checks Assigned before calling it.
Under the hood
mormot.core.os+1
8054ced6+14-25
core: minor #789 refactoring
Impact
Normal process logging cleanup is retained. Code that installs or directly invokes this new hook must respect its method type and possible nil value.
Public API
NotifyThreadEndedsignature-changed
15
Low
Compression tests are scheduled as parallel jobs
TTestCoreCompression.Algorithms schedules memory, ZIP, ZIP encryption and TAlgoCompress checks through the test runner.
Tests
de964e20+280-275
test: parallel run of TTestCoreCompression tests
Impact
No production backend behavior changes; this reorganizes the compression regression suite.
16
Low
Expected YAML exceptions preserve test logging state
TSynTestCase.CheckRaised restores the previous ExceptionIgnoreCurrentThread value; YAML error tests suppress their expected exceptions.
Tests
mormot.core.test
4a3fafff+18-11
test: fixed unexpected YAML exception logging
Impact
Only test diagnostics change; application YAML parsing and backend behavior are unchanged.
Units
17
Low
Peer-cache tests use HTTP under Windows PRISM
The peer-cache regression test removes pcoSelfSignedHttps when wsPrism is detected; a Windows source blank line is also removed.
Tests
mormot.core.os.windows
58df1243+9-3
test: Peer cache fallback to plain HTTP instead of HTTPS on PRISM
Impact
This changes a test transport choice only; deployed peer-cache HTTPS settings are untouched.