mORMot2 DailyDaily read of upstream commits

TLS verification, safer formatting and Delphi mobile networking land together

OpenSSL users should take the complete transport sequence: cross-direction socket retries, default hostname verification and error-queue clearing for OpenSSL 1.x/3.x. A one-build FormatAdder regression could write through an invalid destination when formatting empty output. Delphi Android/iOS gain System.Net HTTP backends, Delphi ARMv7 becomes viable, and TXmlParser now accepts simple DOCTYPE declarations without loading DTD entities.

TL;DR

  • Land on build 2.4.17065 at 743a53fd4cb3af700463b0d143581ce17c6c8b31.
  • OpenSSL clients now verify ServerAddress when HostNamesCsv is empty; OpenSSL 1.x/3.x calls clear stale errors before connect, accept, read and write.
  • Avoid builds 2.4.17025–2.4.17063 for the incomplete OpenSSL retry sequence and build 2.4.17047 for the FormatAdder empty-output overflow path.
  • Delphi Android and iOS can use TDelphiNetHttp, TRestHttpClientDelphiNet and TSqlDBDelphiNetConnectionProperties through the operating-system TLS stack.
  • Delphi Android ARMv7 receives ABI stubs, aligned packed-field JSON handling and variadic-call support.
  • TXmlParser ignores simple external DOCTYPE declarations by default; use xpoRejectDocType to retain strict rejection, and note that internal subsets remain unsupported.

Upgrade advice

Land on build 2.4.17065. OpenSSL deployments should test DNS-name and IP connections with an empty HostNamesCsv, certificate rejection, and SSL_read/SSL_write WANT transitions under OpenSSL 1.1 and 3.x. Audit direct UniqueRawUtf8ZeroToTilde callers because it now returns PUtf8Char and replaces every control byte below #32, not only #0. Strict XML consumers should add xpoRejectDocType. Delphi mobile teams should exercise System.Net redirects, compression, proxies and certificate callbacks on each target.

Build2.4.17024 → 2.4.17065
Commits34
Lines+2648 -805
Read6 min

24 of 24 entries · 34 commits upstream

Stories
# Entry Category Units
1 Critical OpenSSL clients verify ServerAddress when no hostname list is supplied TOpenSslNetTls.AfterConnection now assigns ServerAddress to SSL_set1_host when Context.HostNamesCsv is empty. Explicit CSV names still use the first name with SSL_set1_host and later names with SSL_add1_host; partial wildcards remain disabled. Security mormot.lib.openssl11 c2012a28+8-9

lib: fixed TOpenSslNetTls.AfterConnection hostname verification

Impact

Previously, a default OpenSSL client with certificate checking enabled but no HostNamesCsv verified the chain without configuring the expected peer hostname. It now rejects a validly signed certificate for another host.

Public API

  • TOpenSslNetTls.AfterConnectionbehaviour-changed — Empty HostNamesCsv now means verify ServerAddress, not skip hostname verification.

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

2 High OpenSSL reads and writes retry the opposite socket direction TOpenSslNetTls.Receive now waits when SSL_read returns SSL_ERROR_WANT_WRITE, and Send waits when SSL_write returns SSL_ERROR_WANT_READ. WaitRetry waits in 100 ms slices for the requested TNetEvents and raises after five seconds. Fixes mormot.lib.openssl11 c52d3378+55-28

lib: fixed TOpenSslNetTls.Receive/Send socket level retry

Impact

Renegotiation and TLS state changes on asynchronous sockets no longer become immediate read/write failures when OpenSSL needs the opposite network direction.

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

3 High OpenSSL 1.x and 3.x retries start with a clean error queue ERR_clear_error is added to the dynamic and static libcrypto surfaces. CheckProc, Receive and Send call it immediately before SSL_connect, SSL_accept, SSL_read or SSL_write, as required by OpenSSL through 3.x. Fixes mormot.lib.openssl11+1 b999062f+24-12

lib: fixed TOpenSslNetTls error reset for OpenSSL < 4.x

Impact

Stale per-thread OpenSSL errors no longer contaminate the result of a retried handshake or I/O call, preventing false fatal classifications and misleading diagnostics on OpenSSL 1.1/3.x.

Public API

  • ERR_clear_erroradded — The libcrypto error-queue reset function is now exposed through both dynamic and static OpenSSL bindings.

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

4 High FormatAdder no longer writes through an empty formatter state FormatAdder now calls Dest.Add and WriteAll only when TFormatUtf8.size is non-zero. Empty formats or arguments therefore never enter WriteAll with no initialized blocks. Fixes mormot.core.text 57b8cb89+5-4

core: fixed FormatAdder() potential buffer overflow

Impact

The one-build regression could read uninitialized formatter entries and copy through the destination returned for a zero-byte append, causing a buffer overrun or crash. The guard removes that path.

Public API

  • FormatAdderbehaviour-changed — Formatting zero bytes now performs no destination allocation or write.

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

5 High Delphi Android ARMv7 gains working interface calls and packed JSON A compiled ARM object supplies armfakestub, armcallmethod and 128 VMT thunks for Delphi LLVM. ABI handling moves by-reference results to R0 and Self to R1, JSON copies unaligned float/Int64 packed fields through aligned storage, and DispInvoke follows AAPCS32 va_list alignment. Compiler & platform mormot.core.interfaces+4 7cda59c1+348-33

all: make the Delphi Android 32-bit (ARMv7) target work

Impact

Delphi 32-bit Android can execute interface-based SOA/mock calls, serialize packed numeric fields without ARM alignment faults, and pass 64-bit variadic values correctly. Delphi/FPC desktop paths are conditional and unchanged.

Stefan Diestelmann · 09:21 UTC · view the commit on GitHub →

6 Medium TSynLog stack traces start at the application caller LockAndPrepareWrite accepts a skip count and adds it to AppendCallerShort. Internal formatted, text and RTTI wrappers skip their own frame, while direct Log and Enter paths retain their intended depth; the formatted Enter overload is also expanded instead of redirecting through EnterLocal. Fixes mormot.core.log e0a83a37+32-19

core: fixed TSynLog stack trace

Impact

LevelStackTrace output points to the application call site instead of TSynLog wrapper internals, improving source attribution in production logs.

Worth a look

If tooling parses exact stack positions, compare representative LevelStackTrace lines after upgrading through build 2.4.17046.

Arnaud Bouchez · 10:50 UTC · view the commit on GitHub →

7 Medium TSynLog headers are prepared consistently inside the owned lock LockAndPrepareWrite and LockAndPrepareEnter now receive the instance and call LogHeader after acquiring the writer lock. All call paths drop duplicate header calls, and the UnicodeString Log overload forwards aInstance rather than the wrong Instance identifier. Fixes mormot.core.log efb51396+19-25

core: some TSynLog fixes and optimization

Impact

Log headers and object attribution are consistent across raw, text, RTTI and Enter calls; UnicodeString logs no longer risk associating the wrong instance.

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

8 Medium SQL parameter logs keep placeholders after reaching their size limit TSqlDBStatement.ComputeSqlWithInlinedParams fixes maxAllowed from W.TextLength-maxSize to maxSize-W.TextLength. Once the value budget is exhausted it writes '?' for later parameters and continues through the SQL; getters also tolerate self=nil and exception logging uses the SQL level directly. Fixes mormot.db.sql d080dbe2+22-17

db: fixed TSqlDBStatement logging process

Impact

Bounded diagnostic SQL no longer underflows its remaining-length calculation or drops the tail of the statement, so failure logs stay structurally useful without exposing oversized values.

Worth a look

If operations depend on SQL failure logs, compare LoggedSqlMaxSize output after upgrading.

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

9 Medium XML Save and Restore preserve whether a DOCTYPE is still legal TXmlParser.Save stores fStackLen[0] in the spare byte of its saved QWord and Restore writes it back. This preserves the parser's prolog-versus-root state along with Kind, Depth and cursor position. Fixes mormot.core.fmt adb58c1a+26-6

core: DOCTYPE should be properly supported after Save/Restore

Impact

Speculative parsing around a prolog DOCTYPE can be restored and replayed without falsely treating the declaration as occurring after the document element.

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

10 Medium TDelphiNetHttp embeds the Delphi System.Net transport TDelphiNetHttp now owns THTTPClient directly in mormot.net.client; the temporary mormot.lib.nethttp unit is removed. It maps timeouts, proxies, headers, authentication, redirects, request streams, response headers and certificate callbacks, and avoids decompressing gzip/deflate twice on iOS. New features mormot.defines+1 4964dc05+139-252

net: TDelphiNetHttp as a single class, no new unit

Impact

Delphi Android/iOS can issue HTTP and HTTPS through the platform TLS stack without shipping libcurl or OpenSSL. The class does not implement upload/download progress events.

Worth a look

Mobile Delphi projects should test proxy, redirect, compressed-response and certificate-error behavior on every deployed OS version.

Public API

  • TDelphiNetHttpadded — A public THttpRequest implementation backed by Delphi System.Net.HttpClient is available when USEDELPHINETHTTP is defined.

Stefan Diestelmann · 08:51 UTC · view the commit on GitHub →

11 Medium TXmlParser accepts simple DOCTYPE declarations by default TXmlParser recognizes a prolog <!DOCTYPE name ...> and skips to its closing '>' while respecting quotes. It rejects declarations after the root, internal subsets, nested '<' markup and custom entities; xpoRejectDocType restores unconditional rejection. New features mormot.core.fmt 22056546+128-11

core: TXmlParser ignore simple DOCTYPE by default

Impact

SVG and other XML with an external SYSTEM/PUBLIC declaration can parse without loading the DTD. Strict callers that previously depended on xpeUnsupportedMarkup must opt into xpoRejectDocType.

Worth a look

Add xpoRejectDocType anywhere policy requires rejecting every DOCTYPE rather than safely ignoring simple declarations.

Public API

  • xpoRejectDocTypeadded — The new TXmlParserOption forces the former behavior of rejecting every DOCTYPE declaration.

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

12 Medium REST HTTPS defaults to Delphi System.Net on supported mobile targets TRestHttpClientDelphiNet maps TRestHttpClientRequest to TDelphiNetHttp. When USELIBCURL is absent and USEDELPHINETHTTP is set, TRestHttpsClient aliases this new class instead of the socket client. New features mormot.rest.http.client ad2fbdba+43-8

rest: HTTP/HTTPS RESTful JSON default mORMot Client class with Delphi System.Net

Impact

Existing TRestHttpsClient source on Delphi Android/iOS can acquire HTTPS support through the OS TLS implementation without changing the class name.

Worth a look

Verify that mobile builds resolve TRestHttpsClient to the intended backend and test authentication plus certificate policy.

Public API

  • TRestHttpClientDelphiNetadded — A public REST client class backed by Delphi System.Net.HttpClient is conditionally available.
  • TRestHttpsClientbehaviour-changed — With USEDELPHINETHTTP and without USELIBCURL, the alias now selects TRestHttpClientDelphiNet.

Arnaud Bouchez · 14:48 UTC · view the commit on GitHub →

13 Medium Remote SQL proxy access gains a Delphi System.Net backend mormot.db.proxy adds TSqlDBDelphiNetConnectionProperties under USEDELPHINETHTTP. Its constructor creates TDelphiNetHttp and the class is registered for definition-based construction. New features mormot.db.proxy+1 d9d710d1+39-5

db: introducing TSqlDBDelphiNetConnectionProperties

Impact

Delphi mobile clients can reach a remote mormot.db.sql service over HTTP/HTTPS using the operating-system networking stack.

Worth a look

Projects selecting this backend should run authentication and remote-statement tests on the target mobile OS.

Public API

  • TSqlDBDelphiNetConnectionPropertiesadded — A public HTTP SQL-proxy connection class backed by TDelphiNetHttp is available with USEDELPHINETHTTP.

Arnaud Bouchez · 14:44 UTC · view the commit on GitHub →

14 Medium UniqueRawUtf8ZeroToTilde now returns bounded sanitized text UniqueRawUtf8ZeroToTilde changes from a procedure to a PUtf8Char-returning function. It terminates the returned view at MaxSize and replaces every byte below #32 with '~', instead of replacing only embedded #0 bytes. New features mormot.core.unicode 1f32a7e3+15-12

core: refined UniqueRawUtf8ZeroToTilde()

Impact

Callers can append a bounded C-string without changing the RawUtf8 managed length. Logs also flatten tabs, line breaks and other controls, so exact diagnostic text changes.

Worth a look

Search for direct UniqueRawUtf8ZeroToTilde calls if code relies on preserving control characters or on the old procedure declaration.

Public API

  • UniqueRawUtf8ZeroToTildesignature-changed — The routine now returns PUtf8Char and sanitizes all control bytes below #32 while preserving the RawUtf8 allocation length.

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

15 Medium Delphi Darwin links Mach process APIs from clib The host_processor_info, mach_host_self, vm_deallocate and mach_task_self declarations now specify external clib name instead of treating each symbol name as a library file. Compiler & platform mormot.core.os.posix 60e27c19+4-4

core: name the library for the mach externals on Darwin

Impact

Delphi macOS/iOS builds no longer fail at link time with file not found errors for those Mach symbols. FPC keeps the same library resolution.

Stefan Diestelmann · 07:56 UTC · view the commit on GitHub →

16 Low SOA contract errors expose only one kilobyte of sanitized JSON TServiceFactoryClient.FakeContractRetrieve builds its invalid-response message with Join and the bounded PUtf8Char view from UniqueRawUtf8ZeroToTilde, capped at 1 KB. Fixes mormot.soa.client 9dfdcc05+4-7

soa: fixed TServiceFactoryClient error message content

Impact

Malformed or unexpected SOA responses no longer append the unbounded tail of the managed string after an inserted terminator; diagnostics remain compact and single-line.

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

17 Low Batch rollback logs no longer mutate the managed JSON length TRestOrmServerBatchSend.OnError passes the PUtf8Char returned by UniqueRawUtf8ZeroToTilde directly to the warning formatter and caps displayed batch data at SizeOf(TBuffer4K), instead of inserting a terminator into fData and logging the managed string. Fixes mormot.orm.server c2393ce7+3-4

orm: fixed TRestOrmServerBatchSend.OnError logged content

Impact

Partial-rollback diagnostics are bounded and single-line while the retained batch buffer remains internally consistent for later cleanup.

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

18 Low AppendSysInfo reuses one-second binary and text snapshots RetrieveSysInfo now fills optional binary and text outputs under OSSafe from one one-second TSysInfo cache. The rendered form is cached in TShort95, and AppendSysInfo copies it into the remaining capacity of the caller's ShortString. Performance mormot.core.os+2 743a53fd+52-36

core: cache AppendSysInfo() text for 1 second

Impact

Repeated LevelSysInfo logging within one second avoids rebuilding processor/load/memory text and reuses the same snapshot. Values may therefore remain unchanged for up to one second by design.

Public API

  • AppendSysInfobehaviour-changed — The public helper now appends a cached one-second text snapshot instead of formatting every call.

Arnaud · 21:24 UTC · view the commit on GitHub →

19 Low TSynLog formatting state moves into one pre-render record TPreRenderFmt groups format, arguments, instance, length and the 4 KB stack buffer. TSynLogFamily.PreRenderFmt and formatted Enter/Log paths pass this record instead of many parameters while retaining the direct-rendering fallback. Under the hood mormot.core.log 723e8275+102-84

core: rewritten TSynLogFamily.PreRenderFmt logic

Impact

This is internal plumbing with no intended API or output change, but it begins the logging sequence completed by the following fixes.

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

20 Low TFormatUtf8 and TSynLog wrappers are simplified internally TFormatUtf8 tracks last/max directly and uses a shared WriteAll helper; TSynLog replaces its LogFmt method with AddPreRenderFmt. SQLite logging comments now document the 4 KB pre-render cap. No functional change was intended. Under the hood mormot.core.log+2 b47efdb5+78-72

core: some refactoring with no functional change

Impact

The refactor itself is internal, but its FormatAdder zero-output edge case is fixed immediately by the next non-merge commit; do not stop on build 2.4.17047.

Arnaud Bouchez · 14:08 UTC · view the commit on GitHub →

21 Low DOCTYPE scanning is simplified without widening accepted markup ParseDocType centralizes the root-state, option, name and bounds checks, then scans quotes and forbidden markup in one loop. Tests add a comment-before-DOCTYPE prolog case. Under the hood mormot.core.fmt 3d2c0c85+36-49

core: simplified TXmlParser.ParseDocType for #614

Impact

No intended public behavior changes beyond the preceding DOCTYPE feature; the accepted and rejected forms remain covered by tests.

Arnaud Bouchez · 15:50 UTC · PR #614 · view the commit on GitHub →

22 Low The live DNS test reports timing and raw response details The yahoo.com connectivity test now uses DnsQuery, checks raw and parsed header counts, and prints elapsed time, response size, rcode and truncation diagnostics. Tests e4ebd6dc+29-13

tests: enhanced "dig yahoo.com" test with console output

Impact

Framework behavior is unchanged; failed CI or local network tests provide more actionable DNS evidence.

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

23 Low The failed-statement test uses a silent exception class The #606 external-database test raises and expects ESynLogSilent instead of ESqlDBException so an IDE run does not emit the deliberate failure as normal exception noise. Tests 00a2da4f+4-4

tests: simplified #606 test when run in IDE

Impact

Only test ergonomics change; database exception behavior in application code is unaffected.

Arnaud Bouchez · 07:51 UTC · PR #606 · view the commit on GitHub →

24 Low Log viewer captions expose platform details and tighter rows TMainLogView adds OS_TEXT and CPU_ARCH_TEXT to its caption and adjusts event/list row-height calculations. A JSON indentation-only correction is included. Housekeeping mormot.tools.logview b123f603+7-6

tools: minor TMainLogView tweaks

Impact

Only the desktop log viewer presentation changes; framework logging and JSON serialization behavior are unaffected.

Arnaud Bouchez · 14:42 UTC · view the commit on GitHub →

Upstream activity commits per day · last 60 days
Commits977
Active days44/60
Busiest2026-09-30
Peak60
2026-08-15: 0 commits2026-08-16: 0 commits2026-08-17: 0 commits2026-08-18: 0 commits2026-08-19: 0 commits2026-08-20: 0 commits2026-08-21: 0 commits2026-08-22: 0 commits2026-08-23: 0 commits2026-08-24: 0 commits2026-08-25: 0 commits2026-08-26: 0 commits2026-08-27: 26 commits2026-08-28: 11 commits2026-08-29: 10 commits2026-08-30: 1 commit2026-08-31: 23 commits2026-09-01: 0 commits2026-09-02: 20 commits2026-09-03: 29 commits2026-09-04: 35 commits2026-09-05: 13 commits2026-09-06: 0 commits2026-09-07: 0 commits2026-09-08: 23 commits2026-09-09: 10 commits2026-09-10: 17 commits2026-09-11: 23 commits2026-09-12: 14 commits2026-09-13: 9 commits2026-09-14: 7 commits2026-09-15: 4 commits2026-09-16: 24 commits2026-09-17: 26 commits2026-09-18: 21 commits2026-09-19: 59 commits2026-09-20: 13 commits2026-09-21: 5 commits2026-09-22: 34 commits2026-09-23: 17 commits2026-09-24: 57 commits2026-09-25: 22 commits2026-09-26: 26 commits2026-09-27: 0 commits2026-09-28: 2 commits2026-09-29: 19 commits2026-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: 33 commits2026-10-11: 9 commits2026-10-12: 11 commits2026-10-13: 35 commits
2026-08-152026-10-13