Act nowcan affect a running systemThe raw payload contains 24 non-merge commits and 10 merge commits; every non-merge commit is covered. No superseded_by marker is present. The avoid ranges are based on direct follow-up fixes to the same routines within this payload. Version bookkeeping files were ignored.
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.
24 of 24 entries · 34 commits upstream
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.
Upgrade recommended
Upgrade OpenSSL clients and test both DNS names and literal IP endpoints; set HostNamesCsv explicitly when the certificate identity differs from ServerAddress.
Public API
TOpenSslNetTls.AfterConnectionbehaviour-changed — Empty HostNamesCsv now means verify ServerAddress, not skip hostname verification.
Units
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.
Upgrade recommended
Upgrade through build 2.4.17064 or later and test bidirectional TLS load; do not deploy this retry commit without the later error-queue fix.
Units
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.
Upgrade recommended
OpenSSL 1.1 and 3.x users should take build 2.4.17064 or later and retest asynchronous connect, accept, read and write failure paths.
Public API
ERR_clear_erroradded — The libcrypto error-queue reset function is now exposed through both dynamic and static OpenSSL bindings.
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.
Upgrade recommended
Do not ship build 2.4.17047; use 2.4.17048 or later wherever FormatAdder is reachable.
Public API
FormatAdderbehaviour-changed — Formatting zero bytes now performs no destination allocation or write.
Units
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.
Upgrade recommended
Teams shipping Delphi ARMv7 should rebuild and run interface, variant and packed-record JSON tests on a real 32-bit Android device.
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.
Units
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.
Upgrade recommended
Take build 2.4.17046 or later if the TSynLog pre-render sequence is present.
Units
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.
Units
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.
Upgrade recommended
Use build 2.4.17062 or later if TXmlParser Save/Restore is combined with documents containing DOCTYPE.
Units
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.
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.
Units
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.
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.
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.
Units
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.
Upgrade recommended
Delphi Darwin projects that hit the Mach linker error should rebuild with this revision or later.
Units
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.
Units
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.
Units
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.
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.
Units
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.
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.
Units
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.
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.
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.