mORMot2 DailyDaily read of upstream commits

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.

Build2.4.18082 → 2.4.18103
Commits21
Lines+23614 -14403
Read3 min

17 of 17 entries · 21 commits upstream

# Entry Category Units
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

Arnaud Bouchez · 15:24 UTC · view the commit on GitHub →

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

Arnaud Bouchez · 12:31 UTC · view the commit on GitHub →

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

Arnaud Bouchez · 16:07 UTC · view the commit on GitHub →

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

Arnaud Bouchez · 12:22 UTC · view the commit on GitHub →

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

zen010101 · 04:59 UTC · view the commit on GitHub →

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

zen010101 · 06:15 UTC · view the commit on GitHub →

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

Arnaud Bouchez · 11:00 UTC · view the commit on GitHub →

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

Arnaud Bouchez · 12:33 UTC · view the commit on GitHub →

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.Passwordadded
  • TZipWrite.Encryptionadded
  • TZipEncryptionadded
  • TZipCryptadded
  • ZipCryptClassadded
  • TZipCryptPkwareadded
  • TZipCryptAesadded

tf · 21:08 UTC · view the commit on GitHub →

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

Arnaud Bouchez · 13:01 UTC · view the commit on GitHub →

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.

Arnaud Bouchez · 17:34 UTC · view the commit on GitHub →

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

Arnaud Bouchez · 13:29 UTC · view the commit on GitHub →

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.

Arnaud Bouchez · 17:34 UTC · PR #730 · view the commit on GitHub →

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

Arnaud Bouchez · 07:35 UTC · PR #789 · view the commit on GitHub →

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.

Arnaud Bouchez · 16:18 UTC · view the commit on GitHub →

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.

Arnaud Bouchez · 11:00 UTC · view the commit on GitHub →

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.

Arnaud Bouchez · 09:15 UTC · view the commit on GitHub →

Upstream activity commits per day · last 60 days
Commits1007
Active days49/60
Busiest2026-09-30
Peak60
2026-09-30: 60 commits2026-10-01: 26 commits2026-10-02: 30 commits2026-10-03: 32 commits2026-10-04: 15 commits2026-10-05: 1 commit2026-10-06: 26 commits2026-10-07: 37 commits2026-10-08: 27 commits2026-10-09: 35 commits2026-10-10: 12 commits2026-10-11: 2 commits2026-10-12: 40 commits2026-10-13: 31 commits2026-10-14: 23 commits2026-10-15: 16 commits2026-10-16: 27 commits2026-10-17: 0 commits2026-10-18: 0 commits2026-10-19: 0 commits2026-10-20: 0 commits2026-10-21: 0 commits2026-10-22: 3 commits2026-10-23: 6 commits2026-10-24: 29 commits2026-10-25: 7 commits2026-10-26: 25 commits2026-10-27: 4 commits2026-10-28: 8 commits2026-10-29: 17 commits2026-10-30: 20 commits2026-10-31: 0 commits2026-11-01: 0 commits2026-11-02: 16 commits2026-11-03: 32 commits2026-11-04: 15 commits2026-11-05: 32 commits2026-11-06: 26 commits2026-11-07: 19 commits2026-11-08: 2 commits2026-11-09: 29 commits2026-11-10: 17 commits2026-11-11: 8 commits2026-11-12: 38 commits2026-11-13: 39 commits2026-11-14: 9 commits2026-11-15: 6 commits2026-11-16: 21 commits2026-11-17: 30 commits2026-11-18: 37 commits2026-11-19: 28 commits2026-11-20: 31 commits2026-11-21: 0 commits2026-11-22: 0 commits2026-11-23: 1 commit2026-11-24: 6 commits2026-11-25: 3 commits2026-11-26: 3 commits2026-11-27: 0 commits2026-11-28: 0 commits
2026-09-302026-11-28